Jump to content

Restore previous UCS using VLA


Aftertouch

Recommended Posts

Hey Omega,

 

Your code works fine too. Tho for our company with many users we prefer to be able to use the regular AutoCAD commands. So thats why i want to use 'reactors' instead of the 'simple' use or a new command.

 

Thanks for the suggestion tho!

Link to comment
Share on other sites

  • Replies 21
  • Created
  • Last Reply

Top Posters In This Topic

  • Aftertouch

    9

  • Roy_043

    6

  • Tharwat

    3

  • Lee Mac

    2

@Roy, small suggestion to shorten a few lines:

 

(setq layNew
 (cond
   ((= cmd "ATTACH")                           "XREF")
   ((vl-position cmd '("XATTACH" "DWFATTACH")) "XREF-DWG")
   ((= cmd "IMAGEATTACH")                      "XREF-IMAGE")
   ((= cmd "PDFATTACH")                        "XREF-PDF")
   ((= cmd "POINTCLOUDATTACH")                 "XREF-POINTCLOUD")
   ((= cmd "COORDINATIONMODELATTACH")          "XREF-COORDINATIONMODEL")
 )
)

(setq layNew
 (cadr 
   (assoc cmd '( ("ATTACH" "XREF") ("XATTACH" "XREF-DWG") ("DWFATTACH" "XREF-DWG") ("IMAGEATTACH" "XREF-IMAGE") 
   ("PDFATTACH" "XREF-PDF") ("POINTCLOUDATTACH" "XREF-POINTCLOUD") ("COORDINATIONMODELATTACH" "XREF-COORDINATIONMODEL") ))
 )
)

Good idea: apart from shortening the code it is probably faster as well.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...