Routine that sets UCS to VIEW, runs dimangular, then sets the UCS back to WORLD

Routine that sets UCS to VIEW, runs dimangular, then sets the UCS back to WORLD

evannB2AWD
Enthusiast Enthusiast
478 Views
4 Replies
Message 1 of 5

Routine that sets UCS to VIEW, runs dimangular, then sets the UCS back to WORLD

evannB2AWD
Enthusiast
Enthusiast

I know this routine is a mess. But basically I'm trying to do what the title of the thread says.

 

Can't get the selection to work though. It wants to go straight past the dim command- to the UCS world. It's only because I don't have a good handle on how to use the selection set feature.

 

(defun c:drr ()
(command "ucs" "v")
(command "dimangular"
(ssget "x"))
(command "ucs" "w")
(princ))

0 Likes
479 Views
4 Replies
Replies (4)
Message 2 of 5

ВeekeeCZ
Consultant
Consultant

Perhaps like this?

 

(defun c:drr ()
  (command "ucs" "v")
  (command-s "dimangular")
  (command "ucs" "p")
  (princ)
  )

 

If not, you need to better describe what sort of selection you want to make.

 

 

0 Likes
Message 3 of 5

scot-65
Advisor
Advisor

I think "command-s" is documented not to have any pauses.

Use the "command" and the getvar 'CMDACTIVE / pause method.


Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

0 Likes
Message 4 of 5

ВeekeeCZ
Consultant
Consultant

There were repeated discussions that the command-s is not well documented.

 

There are two major differences in behavior command-s vs command.

* command-s allows repeated user input without using pause (until active command is properly terminated).
* when terminated by non-standard way - using ESC - it does not fall into *error* func (if exists) but continues in evaluation of the subsequent code.

0 Likes
Message 5 of 5

paullimapa
Mentor
Mentor

this avoids using ssget:

 

(defun c:drr ()
(command "_.ucs" "_v")
(command "_.dimangular")
(while (= 1 (getvar 'cmdactive))(command pause))
(command "_.ucs" "_w")
(princ)
)

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos