smarcus3 Posted June 8, 2011 Posted June 8, 2011 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 Quote
DANIEL Posted June 8, 2011 Posted June 8, 2011 you could write a lisp routine to insert the block and prompt you for the value which then updates all the 'x's accordingly. Quote
smarcus3 Posted June 8, 2011 Author Posted June 8, 2011 I wish I could but I only have AutoCAD LT. Quote
smarcus3 Posted June 8, 2011 Author Posted June 8, 2011 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. Quote
DANIEL Posted June 8, 2011 Posted June 8, 2011 thats really going to limit your options, not sure what else they would be though. Quote
smarcus3 Posted June 8, 2011 Author Posted June 8, 2011 I know, I wish I could have full AutoCAD, but my work wont get anything but LT which is handcuffing me. Quote
floripabay Posted June 8, 2011 Posted June 8, 2011 Use Remote Text from the express tools. Rtext is the command. Quote
smarcus3 Posted June 8, 2011 Author Posted June 8, 2011 I don't have express tools, just AutoCAD LT Quote
floripabay Posted June 8, 2011 Posted June 8, 2011 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. Quote
SLW210 Posted June 8, 2011 Posted June 8, 2011 What options are you using for fields? You will need to make the X a separate attribute. Quote
smarcus3 Posted June 8, 2011 Author Posted June 8, 2011 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 ... Quote
BIGAL Posted June 9, 2011 Posted June 9, 2011 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. Quote
dbroada Posted June 9, 2011 Posted June 9, 2011 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. 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. Quote
smarcus3 Posted June 9, 2011 Author Posted June 9, 2011 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. Quote
dbroada Posted June 9, 2011 Posted June 9, 2011 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. Quote
smarcus3 Posted June 9, 2011 Author Posted June 9, 2011 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] Quote
dbroada Posted June 9, 2011 Posted June 9, 2011 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 Quote
Recommended Posts
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.