Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/05/2023 in all areas

  1. A possible quick fix (0 . "LWPOLYLINE") is a 2d polyline (0 . "POLYLINE") is a 3d polyline So use (0 . "*LINE") will find both types.
    2 points
  2. Etransmit settings are stored in the registry: Assuming you're all on the same version of CAD you could export these keys and import. ( Untested ) You could also look at all the subkeys and their values and possibly write them using lisp:
    2 points
  3. Thanks guys, Plenty for me to look over, and trial
    1 point
  4. Yeah it was kinda hard to follow what your saying. This is what your wanting to do? xdata about current project but not linked to any entities in the drawing (remove) xdata linked to entities in the drawing (keep) Still think the easiest thing to do would be saving as new project. then clear old project xdata not linked to entities. no need for multiple drawings, blocks, inserting. See if this works. on clearing the project xdata. if so ill add a save function that will allow you to pick there to save. (defun C:Foo (/ ss) (vl-load-com) (if (setq ss "_X" (ssget)) (command "_.Cutclip" SS "") (C:DeleteXData) ;use old lisp (command "_.Pasteclip" '(0.0 0.0 0.0)) ;paste back in entitys & xdata? ) (princ) )
    1 point
  5. Hey StevenP Yes, this is what i thought, and wondered if it would instead need to be called from a script which can run between 2 drawings i believe!? (not sure if a script and Autolisp can be used together) I see what you mean about copying to the clipboard and then back after creating a new file, the issue with that is it only takes from what is shown on screen, and not any blocks that are saved within the drawing (if i did it correctly), but even so it seems like more steps that I currently use...Although it does help that I wouldn't need to remember the file name, I may have to look more into this i think. I will have to take a look and try the steel.lsp tomorrow, from what i read it sounds like what i need, being able to grab everything into a new file. I suppose it just depends on how many extra steps it needs, if more than i currently do, best way to find out is to give it a try.. Thanks for the help guys, i'll be back with some results
    1 point
  6. @Aftertouch Glad you got it working FWIW I'd refactor the code like so: (vl-registry-write (setq regeditetransmit (strcat "HKEY_CURRENT_USER\\" (vlax-product-key) "\\Etransmit\\setups\\COMPANY SETUP" ) ) ) (foreach pair '(("AEC_EXPLODE_DWG" 0) ("AEC_TEMP_SETUP" 0) ("BindType" 0) ("BindXref" 0) ("Description" "") ("DestFile" "") ("DestFileAction" 0) ("DestFolder" "") ("FilePathOption" 0) ("IncludeDataLinkFile" 1) ("IncludeFont" 1) ("IncludeMaterialTextures" 1) ("IncludePhotometricWebFile" 1) ("IncludeSSFiles" 1) ("IncludeUnloadedReferences" 0) ("Name" "COMPANY SETUP") ("PackageType" 0) ("PurgeDatabase" 0) ("RootFolder" "") ("SaveDrawingFormat" 6) ("SendMail" 0) ("SetPlotterNone" 0) ("ShowInFolder" 0) ("UsePassword" 0) ("VisualFidelity" 1) ) (vl-registry-write regeditetransmit (car pair) (cadr pair)) )
    1 point
  7. 14 pages to read over. https://www.theswamp.org/index.php?PHPSESSID=48p02olnkruljfv4l7fupksnk5&topic=30434.0 -Edit Also search for "Traveling Salesman Algorithm"
    1 point
  8. Alright, seems like thats the only way. Nailed it: Works like a charm. Thanks for the direction. (setq regeditetransmit (strcat "HKEY_CURRENT_USER\\" (vlax-product-key) "\\Etransmit\\setups\\COMPANY SETUP")) (vl-registry-write regeditetransmit) (vl-registry-write regeditetransmit "AEC_EXPLODE_DWG" 0) (vl-registry-write regeditetransmit "AEC_TEMP_SETUP" 0) (vl-registry-write regeditetransmit "BindType" 0) (vl-registry-write regeditetransmit "BindXref" 0) (vl-registry-write regeditetransmit "Description" "") (vl-registry-write regeditetransmit "DestFile" "") (vl-registry-write regeditetransmit "DestFileAction" 0) (vl-registry-write regeditetransmit "DestFolder" "") (vl-registry-write regeditetransmit "FilePathOption" 0) (vl-registry-write regeditetransmit "IncludeDataLinkFile" 1) (vl-registry-write regeditetransmit "IncludeFont" 1) (vl-registry-write regeditetransmit "IncludeMaterialTextures" 1) (vl-registry-write regeditetransmit "IncludePhotometricWebFile" 1) (vl-registry-write regeditetransmit "IncludeSSFiles" 1) (vl-registry-write regeditetransmit "IncludeUnloadedReferences" 0) (vl-registry-write regeditetransmit "Name" "COMPANY SETUP") (vl-registry-write regeditetransmit "PackageType" 0) (vl-registry-write regeditetransmit "PurgeDatabase" 0) (vl-registry-write regeditetransmit "RootFolder" "") (vl-registry-write regeditetransmit "SaveDrawingFormat" 6) (vl-registry-write regeditetransmit "SendMail" 0) (vl-registry-write regeditetransmit "SetPlotterNone" 0) (vl-registry-write regeditetransmit "ShowInFolder" 0) (vl-registry-write regeditetransmit "UsePassword" 0) (vl-registry-write regeditetransmit "VisualFidelity" 1)
    1 point
  9. Use this to look at the DXF codes of the objects you want to select. Hint: You can string them together separating them with commas: (0 . "LINE,CIRCLE,POLYLINE") (defun c:dxflist (/ e) (cond ((setq e (car (entsel "\nPick something to see DXF data: "))) (mapcar 'print (entget e '("*"))) (textscr) ) ) (princ) ) If you don't want an object filter remove the (0 . "LINE") and it will select all items that are a certain color.
    1 point
  10. Excellent and well done. It should help you speed up error checking following the same process rather than waiting for answers here? (I struggled to work our an error in a code you hadn't shared.... the last one you shared had the error on the cons 50 line).
    1 point
  11. Command: (apply 'min '(4 6 1 8 0.5 12)) 0.5 Command: (apply 'max '(4 6 1 8 0.5 12)) 12.0
    1 point
×
×
  • Create New...