Jump to content

Have block's fields update after placing in another drawing.


Recommended Posts

Posted

I have a block that have the same number on it about 50 times. I would only like to input the number once on insertion and have the other 49 ones just grab it. I am not sure if it is possible and have been trying to find a solution for a good part of a day. Please help. Attached is a dwg file with the said ROUGH DRAFT of the block. All of the X's should be the same number.

FIX ME.dwg

Posted

you could write a lisp routine to insert the block and prompt you for the value which then updates all the 'x's accordingly.

Posted

I wish I could but I only have AutoCAD LT.

Posted

I tried to use Fields but cannot find a way to have them placed in the block and then update them on insertion to get the correct number.

Posted

thats really going to limit your options, not sure what else they would be though.

Posted

I know, I wish I could have full AutoCAD, but my work wont get anything but LT which is handcuffing me.

Posted

Use Remote Text from the express tools. Rtext is the command.

Posted

I don't have express tools, just AutoCAD LT

Posted

Well in that case a workaround could be to make X a text and then have the text made a block. Edit the x block and then have the text spell x1 and save the block as x1. Do the same with x2, x3 and so on. Then have everything (x text as block, attributes...) made a block. And do the same but with x1, x2, x3... That way you will have the block with the attributes and the x1,x2... acting as placeholders so you can change x as needed.

Posted

What options are you using for fields? You will need to make the X a separate attribute.

Posted

There is one attirbute for the block which is the card number. The attribute is in the top left. I need all the other X's to be the same card number automatically. The field is using these things ...

 

Screenshot_-_6_8_2011_4_23_35_PM.jpg

Posted

Do you have "find" in LT if the words are unique part-50B-2 then use find it will change all in dwg if its like "A" then no hope as it will find all A's and change them.

Posted

If you just have one number to be used throughout the drawing you can use a field linked directly to the document - at least you can in full blown AutoCAD.

 

Under the file menu click on Drawing Properties and select the resultant Custom tab. Add a property and optionally a value.

 

In the block attribute you add a field as shown (if I remember to attach the image) and now changing the value in the drawing properties followed by a regen will update all blocks.

 

fields.jpg

 

What I haven't tested today - and it is at this point all other "linked field" procedures become unusable is how transportable this is between multiple drawings. I think if you set up the document property in several drawings the field should link but you will have to try it yourself.

Posted

Ill try all of these ideas. Thanks.

Posted
If you just have one number to be used throughout the drawing you can use a field linked directly to the document - at least you can in full blown AutoCAD.

 

Under the file menu click on Drawing Properties and select the resultant Custom tab. Add a property and optionally a value.

 

In the block attribute you add a field as shown (if I remember to attach the image) and now changing the value in the drawing properties followed by a regen will update all blocks.

 

[ATTACH]28093[/ATTACH]

 

What I haven't tested today - and it is at this point all other "linked field" procedures become unusable is how transportable this is between multiple drawings. I think if you set up the document property in several drawings the field should link but you will have to try it yourself.

 

This works! However the only problem is that I cannot find the command to add the drawing property via a macro.

Posted

I know next to nothing about macros but I am at a loss to understand how you would use it. Maybe somebody else can help you though.

Posted

Right now I have a macro that opens up drawing properties and once the user closes it it regens the drawing. The code is as follows. This macro can be run after or before the block with the fields is added. This allows the user to just place the block and click a button to assign it a number. Its pretty good but would like the user to only enter a number for the drawing properties instead of a number and a variable name since if they type the variable name wrong the block will not update with the correct number.

 


^C^C_dwgprops;regen;
[/Code]

Posted

I see. When I used this in the past I used VBA to prepare the drawings and used one of the two following methods. Maybe one of them will help you.

 

    ThisDrawing.SummaryInfo.AddCustomInfo "RigName", Label4.Caption
   ThisDrawing.SummaryInfo.AddCustomInfo "STL_Number", Label3.Caption

 

or

 

    CustomProperty1 = "RigName"
   Property1Value = txtRigName.Text
   CustomProperty2 = "STL_Number"
   Property2Value = txtSTL_Number.Text
   Key0 = CustomProperty1
   ThisDrawing.SummaryInfo.SetCustomByKey CustomProperty1, Property1Value

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