• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

selection of regions

  • Thread starter Thread starter anna24
  • Start date Start date

anna24

Guest
Hello, everyone!
I recently started using visual lisp and I have a problem: in the program that I am carrying out I must carry out an iterative cycle in which, at every step, a new region is generated, to which I must align the current ucts. I found that this passage can be realized through the commands:

(setq ent (entsel "\n select the region"))
(command "_ucs" (cadr ent)

My question is: is it possible to recall the region without having to resort to entget? This command in fact implies the selection to video (to mean, with the mouse in the model), which becomes challenging when you have a high number of iterations.
thanks to all those who want to answer! !
 
as soon as you have created the region, use:
(setq ent)

practically stores the last created entity (_l or _last) in the ent variable.

Hi.
 
Thank you for the answer!
Unfortunately, however, the suggestion you gave me does not work... in order to be able to align the ucts to the section, a point belonging to the section is practically required (at least from what I understood)... doing as you say, you get instead a selection set. in practice, the passage that makes lisp is as follows:

(setq ent (entsel "\n select section"))

_
(<nome 7effa4a0="" entità:=""> (1315.54 621.899 0.0)

(command "_ucs" (cadr ent)

_$ (cadr ent)
(1315.54 621.899 0.0)

I should therefore find the way to automatically take this second element of the carrier ent... the program that I am doing (and that is not yet finished) already requires about 150 selections of sections even close enough, with the risk of selecting the wrong one. . .

Thank you so much to anyone who wants to help me! ! !</nome>
 
attach a region like that, at least I begin to understand something.
If you need to place the ukras using _object, it is not that you need any point in the region, then highlight what this point is.

Hi.
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top