Here's another one for you

Roderic Potter

Usenet Archive
Joined
Jan 23, 2004
Messages
20
Reaction score
0
Take a look at this code:

(COMMAND "insert" blank PAUSE 1.0 "" 0)

Here I use the insert command to specify a point for block insertion, and pause for user click on-screen.

I cannot use other methods like "getpoint" because I want the predefined block "blank" to appear at the cross-hairs when I choose the insertion point. I re-use the same insertion point after this in later code by using the "@" symbol (corresponding to the last point picked).

I want to be able to capture the point picked so I can pass this to a variable such as "pt1". I have not been able to use the "@" symbol to achieve this.

The reason I want to capture the point picked is so that I can add code to evaluate what layer an entity is on, residing at that point, automatically.

Any ideas?
 
(COMMAND "insert" blank PAUSE 1.0 "" 0)
(cdr (assoc 10 (entget (entlast))))

Should also work.

Look out for non WCS points

-David
 
Within a macro or script you would need the hyphen, but not when calling it from the command function.
 

Latest threads

Back
Top