• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

existence

  • Thread starter Thread starter Angelo2449
  • Start date Start date

Angelo2449

Guest
Hello everyone,
I would like to insert a block a certain point on condition that there is not already one (at the point).
How can I proceed?
Thank you.
 
thanks rpor66,
I have tried with these but I always receive error:

(setq a (ssget "x" (cons 0 "insert") (cons 2 "c:\\\autocadsupport\\\\blocchi\\baffovert.dwg") (cons 10 10,10))))))

(setq a (ssget "x" (cons 0 "insert") (cons 2 "baffovert") (cons 10:10,10)))))

Thank you.
 
(setq a (sssget "x" (list (cons 0 "insert") (cons 2 "baffovert")) (cons 10 (out of 10 10))))))
 
I entered the "baffovert" block in 273.8166 196.6457, and executed the command :
(setq a (ssget "x" (cons 0 "insert") (cons 2 "baffovert") (cons 10 (list 273.8166 196.6457)))))))
but the result for a is always nil.

list result for block :
block name: "baffovert"
to point, x= 273.8166 y= 196.6457 z= 0.0000

Thank you.
 
the block coordinate apparently has 4 decimal digits but if it has been inserted in a random point will be much more, then, created a function that selects the blocks to examine and compare the coordinates via equal.
this is the link for the help of the Lisp commands: autolisp functions
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top