←  Technical Questions

nanoCAD forum

»

How to add / access XData

Auum's Photo Auum 01 Feb 2018

I'm using nanCAD en 5.0

I'm trying to add XData to an object, with the following LISP commands

(regapp "TEST")
(entmod (append (entget (car (entsel))) '((-3 ("TEST" (1000 . "TESTING"))))))

which returns an entity list like so:

((-1 . #<Entity name: 05A98928>) (0 . "LWPOLYLINE") (5 . "13CD") (330 . #<Entity name: 05AA67F8>) (100 . "AcDbEntity")
(67 . 0) (410 . "Model") (8 . "Outline") (100 . "AcDbPolyline") (90 . 4) (70 . 0) (43 . 0.0) (38 . 0.0) (39 . 0.0) (10 345.839 -125.792 0.0)
(40 . 0.0) (41 . 0.0) (42 . 0.0) (10 393.839 -125.792 0.0) (40 . 0.0) (41 . 0.0) (42 . 0.0) (10 393.839 -113.792 0.0) (40 . 0.0) (41 . 0.0)
(42 . 0.0) (10 445.839 -96.2863 0.0) (40 . 0.0) (41 . 0.0) (42 . 0.0) (210 0.0 0.0 1.0) (-3 ("TEST" (1000 . "TESTING"))))

However, when I try to use

(ENTGET (CAR (ENTSEL)) '("*"))

or

(ENTGET (CAR (ENTSEL)) '("TEST"))

all I get is the standard entity info:
((-1 . #<Entity name: 05A98928>) (0 . "LWPOLYLINE") (5 . "13CD") (330 . #<Entity name: 05AA67F8>) (100 . "AcDbEntity") (67 . 0)
(410 . "Model") (8 . "Outline") (100 . "AcDbPolyline") (90 . 4) (70 . 0) (43 . 0.0) (38 . 0.0) (39 . 0.0) (10 345.839 -125.792 0.0) (40 .
0.0) (41 . 0.0) (42 . 0.0) (10 393.839 -125.792 0.0) (40 . 0.0) (41 . 0.0) (42 . 0.0) (10 393.839 -113.792 0.0) (40 . 0.0) (41 . 0.0) (42 .
0.0) (10 445.839 -96.2863 0.0) (40 . 0.0) (41 . 0.0) (42 . 0.0) (210 0.0 0.0 1.0)

even

(ssget "X" '((-3 ("TEST"))))

returns nil

Please help!
Quote

Auum's Photo Auum 05 Feb 2018

So I've been doing some playing around; can someone please confirm that while I can input xData and xRecords in nanoCAD 5.0, I can't actually store them or retrieve them? Is this by design?

Clearly both of these things exist and are used by nanoCAD, as viewports and the default ACAD dictionaries work, but nothing I can do (vla- or entmod) seems to store the data.

Many thanks!
Quote