Jump to content

Recommended Posts

Posted

Hello,

 

I have been a lurker on these parts for a while, now i need help with a problem of my own. (I use autocad mechanical 2013)

 

I have a cad drawing which contains 1000's of blocks, each with its own part reference within. As we use autodesk Vault and cad's design centre in tandem both the block name and partref description need to match. At present many block do not.

 

What I am investigationg a a lisp type routine which will automatically rename all blocks in a drawing with its part reference description.

 

As I am a novice with lisp I would like the forums help with this.

 

Kind Regards,

lladoog

Posted

Hi!

 

It´s easy to rename blocks but we need to know where to find the part reference.

Is the part reference put in extended data or is it just inside an attribute?

 

If you don´t know the answer, copy paste this. Select a block and post the outcome here.

(entget (car (entsel)) '("*"))

Posted

Welcome to CADTutor, and congrats on your first post!

 

 

 

How is this 'part reference description' stored with each BlockReference, as part of its name?

 

It sounds like you're wanting to do this in a single batch process, which should be possible, but I'm not sure you've provided enough information (or a sample drawing) for us to help... If nothing else, you could always Right Click Rename what you want, when you want.

 

Cheers

Posted

How were the blocks created? Is this something specific to Mechanical? I'm not saying it can't be customized if it is, just asking if this is something standard in Mechanical. In any case, you should update your profile to show what you are currently using.

 

Oh, and welcome to the forum!

Posted

hi guys,

 

thanks for the replys.

 

ripus - I have ran your code and the following is quoted in the command line:

 

f2.jpg

 

I have attached an example drawing Link: https://dl.dropboxusercontent.com/u/4770031/example%20block.dwg

 

This is a standard block which contains an AMPARTREF object (specific to autocad mechanical). This holds the make / model No' etc of the part.

 

What I would like is a bulk / batch routine which automatically renames all blocks within a drawing with its part reference description housed within each block.

 

as there a many 1000's of blocks I would like this process to be automatic not manual rename as that would consume many weeks of labour.

 

Kind regards,

lladoog

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...