Registered forum members do not see this ad.
Im building a lisp that is going to automaticaly make a block with the same name as the file thats in. With what function i can do that?
Lee Mac Programming
With Mathematics there is the possibility of perfect rigour, so why settle for less?
Just another Swamper
Sorry, my question was a little bit clumsy. I need to Get the Drawing filename.
Two ways:
Code:(vla-get-Name (vla-get-ActiveDocument (vlax-get-acad-object) ) )Code:(getvar 'DWGNAME)
Lee Mac Programming
With Mathematics there is the possibility of perfect rigour, so why settle for less?
Just another Swamper
That should lead to an error:
'BLOCK is self referencing'
-David
R12 (Dos) - A2K
Will this have the same effect?
Code:(command "-wblock" (vla-get-fullname (vla-get-activedocument (vlax-get-acad-object))) "Y" "")
Make a drawing with a block with the same name defined.
Try inserting that dwg file into a new dwg file. You should get an error/ warning. -David
R12 (Dos) - A2K


While this is true, not everybody inserts blocks in this way.
Perhaps if Sakinen could say what exactly he's trying to achieve (i.e. why he needs the block's name to match the drawing) we may be able to help some more.
dJE
Registered forum members do not see this ad.
In 2000 it errors out
Command: -insert
Enter block name or [?]: testb
Block testb references itself
*Invalid*
So in general, it is a bad practice, in real world scenarios, it is an unacceptable format. -David
R12 (Dos) - A2K
Bookmarks