Author Topic: Autocad Editor states  (Read 1290 times)

0 Members and 1 Guest are viewing this topic.

TimAshby

  • Guest
Autocad Editor states
« on: December 12, 2014, 03:37:24 PM »
Can anyone tell me how to tell a LISP whether I've got Reference Editor / Array Editor open?

I've mapped "RED" & "REX" to "REFEDIT" & "REFCLOSE". What I'd like to do is to increase the functionality a little so that "RED" also runs "ARRAYEDIT" if I've a dynamic array selected & "REX" closes the array editor if it's open.

Part 1 - RED to open array - in pseudocode

Code: [Select]
[select entity & check something selected]
(cond
[is an array - any thoughts here? Block name is a *U###, but so are dynamic blocks. Would using (vla-get-effectivename) work as arrays seem to have a *U### as an effective name as well?]
arrayedit
[is a block - (vla-get-objectectname) = block]
refedit
[anything else]
[error message]
);cond

Part 2 - REX to close whatever is open -

Code: [Select]
[determine whether reference edit or array edit is open / running - no idea how to do this - please help! (getvar "CMDNAMES" doesn't return anything useful while either of these is open.]
[appropriate close command]

Thoughts & comments appreciated,

Cheers!