Hello,
I have a blockreference in a dwg that is a like a form, for example:
Written By: Diogo
Author: Diogo
Date: 13-07-2012
State: Check-in
In autocad this is a block, and on the attributes of the blockreference I only can edit State and Author, and i would like to get all values. Because i want to fill those values of Written By, Author, Date and State by code. I can reach the attribute collection of the block but i only can see the State and Author.
Can you please help me?
Thanks and kind regards,
Diogo
Hi,
>> [...] but i only can see the State and Author.
Is it possible, that the other attributes are constant? Upload a drawing with a sample-block ... that makes guessing faster 😉
- alfred -
Hello,
No this are not constant attributes because when I do something like this
BlockReference br = (BlockReference)btr.GetBlockReferenceIds(false, false)[0].GetObject(OpenMode.ForWrite);
AcadBlockReference abr = (AcadBlockReference) br.AcadObject;
Object[] objs = abr.GetConstantAttributes();
The objs has a length of 0.
And when I double click on the blockreference in the autocad I can only edit is State and Author.
Thanks and kind regards,
Diogo
And one more thing, if I go to menu Insert -> AutoCAD attributes and click on hide all attributes the values of state and author disappear but Written By and Date still continue with its values
Hi,
can you upload a drawing having one or two of these BlockReferences inserted?
- alfred -
Try run BATMAN command from the command line
and check / edit attribute properties before
~'J'~
Hello,
I'm sorry but I cannot upload any of these drawings by restricted reasons 😞
Some more new information:
I've converted the block to a xml file and those values on the block that I cannot modify they don't appear in the parameterdefinition in the xml file, but they appear as all other attributes in the tag text, and the attributes that I can modify as something like this %STATE%, and the other I get "Written By:", "Diogo", "Date:", "13-07-2012". Is it possible that they explode the block edit the text values and then join all together? I'm guessing don't know if it is possible
Thanks and kind regards,
Diogo
Hi,
>> I'm sorry but I cannot upload any of these drawings by restricted reasons
Then take two of these BlockReferences, copy&paste them into a new drawing plus modify the attributes-content. Look if the problem you have with your code also occurs now and then send the new drawing (as imho now there are not any more restrictive data in it).
- alfred -
Can't find what you're looking for? Ask the community or share your knowledge.