Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Passing a point list inside an active command.

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
gccdaemon
435 Views, 7 Replies

Passing a point list inside an active command.

I've been trying to to get a list of points (POINTLIST) to place each point (PT) in an active command, and the following string seems to be acting odd.

 

(command "-refedit" "O" "N" "CP" (foreach PT POINTLIST (Command PT)) "" "N")

 

This is causing a random point way out of the selection area to be generated between the first point and last point in the POINTLIST, and I'm not sure how to get around it. Any suggestions?

Andrew Ingram
Civil 3D x64 2019
Win 10 x64 Pro
Intel Xeon E5-1620
32 GB Ram
7 REPLIES 7
Message 2 of 8
hmsilva
in reply to: gccdaemon

Not much diferente, but try it

(command "-refedit" "O" "N" "CP")
(foreach pt POINTLIST (command pt))
(command "" "" "N")

HTH

Henrique

EESignature

Message 3 of 8
gccdaemon
in reply to: gccdaemon

That seems to do the trick.

 

Next question: Is there a way to freeze/turn off objects not in the refedit selection?

Andrew Ingram
Civil 3D x64 2019
Win 10 x64 Pro
Intel Xeon E5-1620
32 GB Ram
Message 4 of 8
hmsilva
in reply to: gccdaemon


@gccdaemon wrote:

That seems to do the trick.

 

Next question: Is there a way to freeze/turn off objects not in the refedit selection?


I don't see how.
A way to prevent multiple copy of the same entity, is after copy adding the entity name to a list and for the next copy test if the entity name is in the list, if so don't copy, if not, copy and add the name to de list...
HTH
Henrique
 

EESignature

Message 5 of 8
gccdaemon
in reply to: gccdaemon

I think I'll pass the SS through the isolate command. That should take care of what I need.

Andrew Ingram
Civil 3D x64 2019
Win 10 x64 Pro
Intel Xeon E5-1620
32 GB Ram
Message 6 of 8
Lee_Mac
in reply to: hmsilva

hmsilva wrote:

Not much diferente, but try it

(command "-refedit" "O" "N" "CP")
(foreach pt POINTLIST (command pt))
(command "" "" "N")

HTH

Henrique

 

You could also use the apply function:

 

(command "_.-refedit" "_o" "_n" "_cp")
(apply 'command pointlist)
(command "" "" "_n")
Message 7 of 8
hmsilva
in reply to: Lee_Mac


@Lee_Mac wrote:

You could also use the apply function:

 

(command "_.-refedit" "_o" "_n" "_cp")
(apply 'command pointlist)
(command "" "" "_n")

Agree! Smiley Wink

 

Henrique

EESignature

Message 8 of 8
Gary_J_Orr
in reply to: gccdaemon

Check out my cross post for a workaround on the "Lock Objects..." not being initialized during the "-Refeidt" command and "copy objects" selecting what should be locked problem.

 

http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/This-is-going-to-feel-like-a-repost-b...

 

Gary J. Orr
(Your Friendly Neighborhood) CADD/BIM/VDC Applications Manager
http://www.linkedin.com/in/garyorr

aka (current and past user names):
Gary_J_Orr (GOMO Stuff 2008-Present); OrrG (Forum Studio 2005-2008); Gary J. Orr (LHB Inc 2002-2005); Orr, Gary J. (Gossen Livingston 1997-2002)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost