Still, let me focus on the DICTIONARY first: reading from the help files :
"DICTIONARY group codes[...]
280 Hard-owner flag. If set to 1, indicates that elements of the dictionary are to be treated as hard-owned
281 Duplicate record cloning flag (determines how to merge duplicate entries):
0 = Not applicable
1 = Keep existing
2 = Use clone
3 = <xref>$0$<name>
4 = $0$<name>
5 = Unmangle name
[...]"I would tend to agree that it is a matter of inter-file behavior, were it not for the specific phrasing used above:
281 [...] (determines how to merge duplicate entries)and furthermore there is the 280 already there.
I have already created my dictionary :
((-1 . <Entity name: 7ff76e211ee0>) (0 . "DICTIONARY") (5 . "D07E") (102 . "{ACAD_REACTORS") (330 . <Entity name: 7ff76e211ea0>) (102 . "}") (330 . <Entity name: 7ff76e211ea0>) (100 . "AcDbDictionary") (280 . 0) (281 . 2) (3 . "TESTXREC") (350 . <Entity name: 7ff76e212060>))and when I ran the following twice : (
ak_test_dic_en holds my dictionary's entity name)
(defun xrectestadd ( / )
(dictadd ak_test_dic_en "TESTXREC"
(entmakex (list '(0 . "XRECORD") '(100 . "AcDbXrecord") '(280 . 2) (cons 300 "2B07" ) ) )
)
)
The result is (granted, as already stated but still not clear why) :
((-1 . <Entity name: 7ff76ec126e0>) (0 . "XRECORD") (5 . "D1CD") (102 . "{ACAD_REACTORS") (330 . <Entity name: 7ff76ec11ee0>) (102 . "}") (330 . <Entity name: 7ff76ec11ee0>) (100 . "AcDbXrecord") (280 . 2) (300 . "2B07"))whereas the second run of the code it returned
nil.
Maybe is it an "inheritance" thing from the (namedobjdict) where my dictionary resides??? But, doesn't everything in a dwg file end up residing in there?
And, as a last thought, in the second to last paragraph of
this very helpful tutorial, it is stated :
Sometimes when updating a Dictionary it's easier to remove/delete it and replace it with a new entry, but that will be for your pleasure to explore.I am currently in that exact procedure of exploring when it is best to do what , but I am not finding it very
pleasurable I know what to do for reading my entries and re-creating them, but since I intend to be able to do it for many, many objects (somewhere in the thousands), I know that a replacing technique would be more efficient. Still, if there absolutely is no way that can be done, then I would search for other ways to do it, or settle for
slow. Currently, I hope there will be a way, reading the signs above as I have, and am hopeful that I or someone else will help go there.