Message 1 of 6
Getting Entity dxf group 0

Not applicable
02-17-2003
03:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Sorry for such a basic question but I'm just beginning with the ObjectARX -
everything I've been doing so far is with LISP.
Here is the element (along with it's xdata) I'm selecting:
((-1 .) (0 . "LINE") (330 . )
(5
. "988A") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "BEAM") (100 .
"AcDbLine") (10 1272.0 -207.0 0.0) (11 1272.0 -207.0 180.0) (210 0.0 0.0
1.0)
(-3 ("EMD72120xA-34" (1002 . "{") (1000 . "COL") (1040 . -41.0464) (1040 .
22.4) (1070
. 7) (1070 . 12) (1040 . 485.0) (1040 . 485.0) (1040 . 777.0) (1070 . 1)
(1040
. 0.0) (1040 . 0.989204) (1040 . 0.0) (1040 . 0.0) (1040 . 0.0) (1040 . 0.0)
(1040 . -0.989204) (1040 . 0.0) (1040 . -14.8381) (1040 . 0.0) (1040 . 0.0)
(1002 . "}"))))
I figured out how to get the handle (5), startpoint (10), endpoint (11),
layer (8) and all of the xdata that I've attached to it but I can't figure
out how to get the (0 . "LINE") . I want to check before I use
acedEntSel("\nSelect an Entity: ", en, pt);
acdbGetObjectId(eId, en);
acdbOpenObject(pEntity, eId, AcDb::kForRead);
//...here I get the layer, the color and the handle and then close
pEntity...
acdbOpenObject((AcDbObject*&)pLine, eId, AcDb::kForRead);
//...here I get the startpoint and endpoint and then close pLine...
acdbOpenObject(obj, eId, AcDb::kForRead);
//...here I get the xdata
Everything works fine but I must check that the user has selected a "Line"
element before I get the startpoint, endpoint and xdata. If a circle is
selected, startpoint & endpoint have no meaning and the xdata I use is
different.
Thanks in advance,
Ed
everything I've been doing so far is with LISP.
Here is the element (along with it's xdata) I'm selecting:
((-1 .
(5
. "988A") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "BEAM") (100 .
"AcDbLine") (10 1272.0 -207.0 0.0) (11 1272.0 -207.0 180.0) (210 0.0 0.0
1.0)
(-3 ("EMD72120xA-34" (1002 . "{") (1000 . "COL") (1040 . -41.0464) (1040 .
22.4) (1070
. 7) (1070 . 12) (1040 . 485.0) (1040 . 485.0) (1040 . 777.0) (1070 . 1)
(1040
. 0.0) (1040 . 0.989204) (1040 . 0.0) (1040 . 0.0) (1040 . 0.0) (1040 . 0.0)
(1040 . -0.989204) (1040 . 0.0) (1040 . -14.8381) (1040 . 0.0) (1040 . 0.0)
(1002 . "}"))))
I figured out how to get the handle (5), startpoint (10), endpoint (11),
layer (8) and all of the xdata that I've attached to it but I can't figure
out how to get the (0 . "LINE") . I want to check before I use
acedEntSel("\nSelect an Entity: ", en, pt);
acdbGetObjectId(eId, en);
acdbOpenObject(pEntity, eId, AcDb::kForRead);
//...here I get the layer, the color and the handle and then close
pEntity...
acdbOpenObject((AcDbObject*&)pLine, eId, AcDb::kForRead);
//...here I get the startpoint and endpoint and then close pLine...
acdbOpenObject(obj, eId, AcDb::kForRead);
//...here I get the xdata
Everything works fine but I must check that the user has selected a "Line"
element before I get the startpoint, endpoint and xdata. If a circle is
selected, startpoint & endpoint have no meaning and the xdata I use is
different.
Thanks in advance,
Ed