Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

selecting objects from commands and through scripts

hardikyp
Participant

selecting objects from commands and through scripts

hardikyp
Participant
Participant

I am trying to write a script which generates a set of spline curves in 3D space passing through a set of points. Once these splines are generated, I want to select two curves at a time and create a lofted surface between these two curves.

 

I can select these curves with the help of mouse. However, I want to automate the whole process and do it using scripts. Can anyone help me understand how to select a particular object in my autocad drawing simply through commands and without the use of mouse at all?

 

Thanks in advance!

0 Me gusta
Responder
Soluciones aceptadas (1)
507 Vistas
2 Respuestas
Respuestas (2)

Kent1Cooper
Consultant
Consultant
Solución aceptada

I imagine it would involve saving each Spline as a variable after it is drawn:

....

  {whatever draws a Spline}

  (setq spline1 (entlast))

  {whatever draws the next Spline}

  (setq spline2 (entlast))

....

 

Then you would have a distinct variable name for each Spline, which you could use in LOFT commands.

 

If you always need to Loft between adjacent Splines in the sequence of generating them, you could have one such variable:

....

  {whatever draws a Spline}

  (setq spline1 (entlast))

  {whatever draws the next Spline}

  (command "_.loft"  ... use the spline1 variable and (entlast) ...)

....

and repeat.

Kent Cooper, AIA

hardikyp
Participant
Participant
Thank you very much! That solved my problem
0 Me gusta