First time posting, just wanted to thank everyone for all the data up here i have usually been able to find what i need without having to ask, but this time i am truely stumped.
I am trying to add an additional regapp and data to an entity that already has xdata.
(entmod
(subst (append (assoc -3 (entget #bomitem '("*"))) (list (list "GN_NOTE" '(1002 "{")(cons 1005 (cdr (assoc 5 (entget #last_note_name))))'(1002 "}"))))
(assoc -3 (entget #bomitem '("*")))
(entget #bomitem '("*"))
);subst
);entmod
I keep getting "; error: bad DXF group:" I've tried setting it to a variable and trying entmod also
any assistance would be greatly appriciated
Thanks in advance for your help!
Solved! Go to Solution.
Solved by hmsilva. Go to Solution.
@nunleym wrote:
First time posting, just wanted to thank everyone for all the data up here i have usually been able to find what i need without having to ask, but this time i am truely stumped.
I am trying to add an additional regapp and data to an entity that already has xdata.
Welcome to the Autodesk Discussion Community, nunleym!
If your goal is to add 'an additional regapp' try
(regapp "GN_NOTE") (entmod (append (entget #bomitem) (list (list -3 (list "GN_NOTE" (cons 1005 (cdr (assoc 5 (entget #last_note_name)))))))))
Hope that helps
Henrique
Thanks for the reply silva,
The result I am looking for is something like this:
(-3 ("ITEM" (1002 "{") (1000 . "29336") (1002 "}")) ("GN_NOTE" (1002 "{") (1005 . "8668") (1002 "}")))
I am looking to add additional xdata to an entity that already has a regapp and xdata attached.
Thank you
Your code, revised...
You did miss two dots..
(entmod
(subst (append (assoc -3 (entget #bomitem '("*"))) (list (list "GN_NOTE" '(1002 . "{")(cons 1005 (cdr (assoc 5 (entget #last_note_name))))'(1002 . "}"))))
(assoc -3 (entget #bomitem '("*")))
(entget #bomitem '("*"))
);subst
);entmod
Hope that helps
Henrique