PDA

View Full Version : Selecting objects in a script



Zoe the 3rd
9th Jan 2012, 03:10 pm
Hello!

I'm new to scripting, I dabbled a bit in AutoLisp years ago, but since my new AutoCAD LT doesn't support lisps I haven't retained that knowledge. Anyway...

I am trying to write a script that will use the MOVE command and displace an object by a set distance. (I have to do this thousands of times over.) However I do not know how to select the object from with in the script. Anyone know how to do that?

ReMark
9th Jan 2012, 04:29 pm
Is the object a block?

Zoe the 3rd
9th Jan 2012, 04:46 pm
Nope. They are usually rectangles or polylines.

I'm also now looking into macros... I know zip-diddly about macros, but they seam like they might work. The macro gets to the user input easy enough, but then I don't know how to get it back to running my selections.

So far I have: ^C^Cmove \d0,-20

but it stops after the \ and won't go back to my selection of "d".

BIGAL
12th Jan 2012, 02:55 am
Try select first then ^c^cmove 0,0 0,-20

Zoe the 3rd
22nd Jan 2012, 05:22 pm
:D That worked!! Staving off carpal tunnel for yet another year. :)

Thank you BIGAL!