cart: empty [ Login ]

ACAD $CUSTOMPROPERTYTAG

1 
Earthbound
4/17/2008 8:45 PM
Do we have access to the Name/Value pairs stored there? If so, though what class?
Wout
4/17/2008 9:45 PM
Currently not, strange that I don't see that variable in the DXF spec, is there any documentation on it? Wout
Earthbound
4/18/2008 1:49 AM
It is the ACAD drawing properties (Custom -> Name/Value), you probably knew this though... It is handled differently between DXF version 2002 and 2005. In 2002 you find the pairs listed under DWGPROPS COOKIE In 2005 you find them as $CUSTOMPROPERTYTAG/$CUSTOMPROPERTY pairs I hope that you can give me access to the pairs as I have information stored that I need to complete this project. Let me know if there is anything that I can do here on my end. Thanks - Johan.
Wout
4/18/2008 1:51 AM
Hi Johan, Didn't know that since it's not in the DXF spec (like a lot isn't). I'll try to implement it somewhere in the coming week. I'll keep you posted! If you could send me some 2002/2005 samples that'd be handy by the way. Wout
Earthbound
4/18/2008 9:53 PM
Wout, If you can provide me with an example of adding XRecord or Dictionary data to the DXF model that would solve my problem. I think XRecord would be perfect for what I need. The DxfXRecord class is new and I am not getting anywhere with it in as far as creating a XRecord object and adding it to the model. Johan.
Wout
4/18/2008 10:29 PM
You can add any DxfObject (or sub class like DxfXRecord) as an entry value to the DxfDictionary.Entries. Take e.g. the DxfModel.DictionaryRoot and add entries to that (give a unique name to the entry). If you need more info I could put together an example this weekend, and I should add that to the documentation. Wout
Earthbound
4/18/2008 10:36 PM
Acctually I was mistaken. XRecord may not be the way I want to go. According to the DXF Spec the data could be lost: 'Xrecord objects are designed to work in such a way as to not offend releases R13c0 through R13c3. However, if read into a pre-R13c4 level of AutoCAD, xrecord objects disappear. ' So, I have some question about using Dictionary entries because I am making some assumption after reading the Dictionary section in the DXF Spec. 1. What does the  Hard Reference flag do for me? 2. Do I need to create a dictionary name or is this handled internally? if I need to name it how? I assume that my Name/Value pairs are assigned to a dictionary object I name. Is it really this simple? DxfDictionaryEntry ent = new DxfDictionaryEntry('EBData', 'TEST STRING', false); testModel.DictionaryRoot.Entries.Add(ent); Thank you - Johan.
Earthbound
4/18/2008 10:39 PM
My mistake the 'TEST STRING' should be one of the sub class object. I got it... :-)
1