Lawrst Posted September 28, 2016 Share Posted September 28, 2016 I have been looking around but still can't find an answer to this. I want to create a block, for electrical schematics, simply that has a bunch of page and line references. The lines will be set, the pages will be the variable. I want to be able to type 01 or 99 into an attribute and have that reflected to all of the page references within the block. Using a field within the block won't update when I change the attribute. The only way I have found to do something similar is a field that is looking at a lines length. Then just using an increment linear dimension this varies the length of the line. I dont mind this but the issue I can't solve with it is the 1-9 I want 01,02,03,04 not 1,2,3,4 etc. Is anyone able to help me with either of these? I hope I make sense and I have placed this in the right place. Quote Link to comment Share on other sites More sharing options...
alanjt Posted September 28, 2016 Share Posted September 28, 2016 If you can type in the value, you can use an object reference within the other attributes that references the attribute you actually filled in. I've attached a graphic scale block I did that allows me to edit the attribute that displays the scale value, and the other attributes in the block reference the first attribute, and just add a scale factor to change the value. The trick is to create the attribute block, create all the reference fields by editing the attributes, then create a block out of that block to use for inserting. When the block is inserted, just explode and all values will be filled in. scale_small_EXPLODE.dwg Quote Link to comment Share on other sites More sharing options...
Lawrst Posted September 28, 2016 Author Share Posted September 28, 2016 I understand what you've done, but it becomes quite cumbersome when I have 90 or so attributes. Does anyone have any other ideas? Is there a way to force a field to display 2 characters regardless? 01 02 etc. When given a value of 1 or 2? Quote Link to comment Share on other sites More sharing options...
Lawrst Posted September 29, 2016 Author Share Posted September 29, 2016 I have attached what I currently have, hopefull this all makes sense. Schematic Template.dwg Quote Link to comment Share on other sites More sharing options...
kamijin Posted October 3, 2016 Share Posted October 3, 2016 Did not understand your question actually. You need to able to set the page number? Using a field within the block won't update when I change the attribute. Quote Link to comment Share on other sites More sharing options...
Lawrst Posted October 3, 2016 Author Share Posted October 3, 2016 So if for example within the block editor if i used a field in the default value of Att2 to reference the value of Att1 (both attributes are contained within the same block) It will only ever update with the default value of Att1. So instead of a text format to edit all of the page numbers I have used a linear dimension with a stretched line. The page number references (the top line of the bubble) have fields that references this line. Unfortunate this has resulted in the field returning a value of 1 instead of 01 as required by our drawing standards. Quote Link to comment Share on other sites More sharing options...
RobDraw Posted October 4, 2016 Share Posted October 4, 2016 Just throwing this out there as a generality. Sometimes it is easier to change the standard than it is to make the program meet the standard. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted October 5, 2016 Share Posted October 5, 2016 There may be a way of formatting text the old fashioned way like me to old 123.456 ###.# = 123.4, so 1 maybe ## = 01. Using lisp not a problem but you have LT. Steve-g you watching ? A diesel function to check Quote Link to comment Share on other sites More sharing options...
steven-g Posted October 5, 2016 Share Posted October 5, 2016 Not sure about Diesel, but you can use a trick to get multiple attributes to show the same value, the second (and following) attributes use a field for the value, you pick an object for the field and select the first attribute and from the properties select value, make sure the box "display value for block reference" is ticked. If you add attributes to an existing block you will need to use the attsync command before the block updates. You have to include a dynamic parameter, it doesn't matter which one, so long as a dynamic action is performed on the block when it has been inserted (you only need do this once but it has to be done for the trick to work) and once you have a working block you can copy it as often as you like and they all work. It takes a lot of explaining but try the attached file the 3 blocks work (when alter the Attribute "count" and do a regen, but insert a new block and it won't work untill after you alter the visibility state just one time) It would be cumbersome to have to go through this process for your 99 lines, luckily when you have created the second attribute with the working field you can copy it within the block editor and paste as much as you want (though it would be a good idea to edit each one to have a unique TAG, as Autocad can do strange things when TAG's aren't unique (quickest way is select an attribute and change the TAG value in the properties palette). Schematic Template (1).dwg Quote Link to comment Share on other sites More sharing options...
Lawrst Posted October 6, 2016 Author Share Posted October 6, 2016 Thats not a bad solution, didnt know that existed. Thanks. I guess the issue i have with it is doesn't achieve much more than creating a field external to the block editor with the attributes to do the same thing (this just saves some time with not needing to redo the fields constantly). It doesnt seem to work for text unfortunately, that would have been the real solution. Quote Link to comment Share on other sites More sharing options...
steven-g Posted October 6, 2016 Share Posted October 6, 2016 It does work for text !!! don't forget the regen command after making changes Quote Link to comment Share on other sites More sharing options...
Lawrst Posted October 6, 2016 Author Share Posted October 6, 2016 I'll have to double check! I'm on 2014 Lt and from memory text didn't have the same tick box within the field. Quote Link to comment Share on other sites More sharing options...
steven-g Posted October 6, 2016 Share Posted October 6, 2016 Try it in the example I posted, when it says value in the field properties it just means the contents Quote Link to comment Share on other sites More sharing options...
Lawrst Posted October 6, 2016 Author Share Posted October 6, 2016 It only seems to reference the attributes default value. Quote Link to comment Share on other sites More sharing options...
steven-g Posted October 7, 2016 Share Posted October 7, 2016 If you edit the field there is a chance that you can break the block. Try this, select one of the blocks, and alter the value in the properties palette. And then run the regenall command If you change the value of an attribute by editing then that overwrites the field. Quote Link to comment Share on other sites More sharing options...
Lawrst Posted October 11, 2016 Author Share Posted October 11, 2016 The issue there is I still have 90 or so Attributes in the end with fields. This is what I was hoping to avoid. The way I have it is an easier solution to understand but i do appreciate the efforts. Quote Link to comment Share on other sites More sharing options...
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.