PDA

View Full Version : read external data


clovis
2006-07-12, 02:48 PM
Hello,
we're using mechanical 2006. I'd like to extract de data saved in the entity in the attached dwg. and put them in a txt file, But I don't know how to retrieve them.
Any thoughts?
Thanks

peter
2006-07-13, 08:12 PM
This block doesn't have any xdata on it that I can see.

DO you have another sample?

Is it Ldata on it?

Peter

clovis
2006-07-17, 09:47 AM
Hi Peter,
the dwg was saved as 2k so it lost the info.
Here a new one (better one!)
I've made some research with
(SETQ OK NIL
TBAPPID (TBLNEXT "APPID"T)
LISTAPPID '()
)
(WHILE (NOT OK)
(PROGN
(SETQ LISTAPPID(APPEND(LIST(CDR(ASSOC 2(SETQ TBAPPID(TBLNEXT "APPID")))))LISTAPPID))
(IF (NOT TBAPPID)(SETQ OK T))
)
)
(SETQ LISTAPPID (CDR LISTAPPID))
without real success
thanks for your help

[ Moderator Action = ON ] What are [ CODE ] tags... (http://forums.augi.com/misc.php?do=bbcode#code) [ Moderator Action = OFF ]

Leon.Brumin
2006-07-17, 04:58 PM
there is no xData in this file
try this code

(entget(car(entsel))'("*"))

clovis
2006-07-18, 07:33 AM
Hello,
It's maybe not xdata but there's some
when I list it I get
===
LIST
Select objects: 1 found

Select objects:
ACMPARTREF Layer: "AM_12"
Space: Model space
Handle = 2e1
Insertion point: X= 73.20 Y= 142.01 Z= 0.00
NAME = nom
DESCR = def
STANDARD = type
MATERIAL = mat
===
where NAME, DESCH, STANDARD, MATERIAL are informations stored in this (0 . "ACMPARTREF")??
Thanks anyways

Leon.Brumin
2006-07-19, 10:15 PM
Try this code
(entget(car(entsel))'("*"))

and post the answer here

for example here is the data stored in LDD point

Command: (entget(car(entsel))'("*"))

Select object: ((-1 . <Entity name: 7e16cf50>) (0 . "AECC_POINT") (330 .
<Entity name: 7efa7cf0>) (5 . "421A") (100 . "AcDbEntity") (67 . 0) (410 .
"Model") (8 . "C-Ground") (100 . "AecDbEntity") (102 . "{AEC_SUBOBJECT") (300 .
"AeccImpPoint") (100 . "AecImpObj") (3 . "") (100 . "AecImpEnt") (171 . 0) (100
. "AecImpGeo") (10 1008.55 4947.07 0.0) (15 1.0 0.0 0.0) (16 0.0 1.0 0.0) (210
0.0 0.0 1.0) (360 . <Entity name: 0>) (100 . "AeccImpPoint") (90 . 504) (11
1013.97 4970.21 99.001) (302 . "dummy") (301 . "") (300 . "") (280 . 0) (303 .
"dummy") (304 . "") (305 . "") (10 1008.32 4947.19 0.0) (285 . 0) (286 . 1)
(170 . 3) (141 . 0.25) (306 . "STANDARD") (140 . 0.25) (282 . 1) (283 . 1) (284
. 1) (171 . 2) (172 . 1) (173 . 3) (287 . 0) (142 . 0.0) (288 . 1) (102 .
"AEC_SUBOBJECT}") (102 . "{AEC_NULLOBJECT}") (100 . "AecDbGeo") (100 .
"AeccDbPoint"))

where group 302 is Description -> (302 . "dummy")

clovis
2006-07-20, 04:36 PM
Hello,
Wel, I get the following

((-1 . <Entity name: 7e529698>) (0 . "ACMPARTREF") (5 . "11993")
(102 . "{ACAD_REACTORS") (330 . <Entity name: 7e529680>) (102 . "}") (330 .
<Entity name: 7efd6cf8>) (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 .
"AM_12") (100 . "AcmSymbolClass") (10 4519.26 5563.32 0.0) (11 1.0 0.0 0.0) (12
0.0 1.0 0.0) (40 . 10.0) (1 . "ANSI") (100 . "AcmPartRef") (340 . <Entity name:
7e529680>) (280 . 1) (340 . <Entity name: 7e529690>))

any idea's?

Thanks

Leon.Brumin
2006-07-20, 05:14 PM
nested objects

Can be xRecord NOT xData(extended entity data)
http://www.cadtutor.net/forum/viewtopic.php?t=2596

(102 . "{ACAD_REACTORS")

check (330 .. and both (340 ..

clovis
2006-07-20, 05:27 PM
Thanks Leon, I'll take a look
Have a good weekend
Bye