Jump to content

Block name same as drawing name


sakinen

Recommended Posts

That should lead to an error:

 

'BLOCK is self referencing'

 

-David

I’m afraid that there is no restriction for having a block with the same name as the drawing that contains it - just tested in 2008 and 2010.

 

Regards,

Mircea

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

testb.dwg

Link to comment
Share on other sites

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

I need to prepare blocks for autocad MEP mvparts. The name of the drawing is the name of the future dimension of the part in the mvparts so its easy to add them when the names of the blocks and the names of the drawings are the same. I have alot of those and i need to make it automatic.

Link to comment
Share on other sites

I need to prepare blocks for autocad MEP mvparts. The name of the drawing is the name of the future dimension of the part in the mvparts so its easy to add them when the names of the blocks and the names of the drawings are the same. I have alot of those and i need to make it automatic.

 

But the drawing is the block - I'm with David on this one.

Link to comment
Share on other sites

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

Ill better tell the whole story. What i wanted in this thread is part of the problem. I want to make MVparts for autocad MEP. I have lets say 50 drawings of 50 3d circulating pumps. I need to make mvpart with 50 "sizes". I need to open the file, then make a block of 3d model and name it like the file because the file is named after the pump "size" (type). When im making MVPARTS and ad sizes its easy when a block is named after a pump type. Of course when i do this in all of the drawings i need those blocks in one drawing so i can pull them in MVPART. I have about 300 pump sizes so you can imagine what a taunting and time consuming job this is.

Link to comment
Share on other sites

(defun c:BMK ()
(command "-block" (getvar 'DWGNAME) "0,0,0" "all" "")
)

This is what i came up with your help. The problem is that it names the block xxxx.dwg. I dont need an extension in block name.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...