Editing Entity Data with LISP
Hi all,
we want to edit edata from CADworx Components. Once the core is working we have multiple scenarios to use it.
Attaching Xdata doesn't work it will kill the CADworx Components.
F.e. we want to change this value
First Step would be editing a Single Item
(setq Plist (entget (car (entsel)) '("CPD1")))
(setq Pxlist (assoc -3 plist))
(setq plist (cadr pxlist))
(setq RL (nth 5 plist))
We use this Code to read the corresponding Information.
Next step would be changing the generated List but how to write this List back into the selected Item ?
Next step would be selecting multiple ITEMS with the same Entity Data to Change all Values for this group.
Comments
-
Hello.
You could experiment with using the (vla-GetXData) and (vla-SetXData) functions.
- (vla-GetXData) would return 2 arrays, one with types and one with values.
- Searching the values array would identify the position of the current value.
Then, from the types array, the type could be retrieved - this is to check the same type is used. - Then, the values array could be updated.
- Finally, with (vla-SetXData), the extended data could be updated.
0 -
Afralisp has a good Xdata tutorial. Do a google.
Can you wblock out an object and post so we can maybe do something for you.
0