Author Topic: issues with assoc 10 of an AECC_POINT  (Read 1262 times)

0 Members and 1 Guest are viewing this topic.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
issues with assoc 10 of an AECC_POINT
« on: June 04, 2008, 04:33:57 PM »
so i noticed an issue with trying to assoc to get the insertion point of an AECC_POINT. if you have not gripped and moved the label around, the assoc 10 works fine, but if you HAVE gripped and moved the label (as seen in the picture below), even though it doesn't change anything about the point, assoc 10 will now give you the insertion point of the piece of text (which is just part of the AECC_POINT) which is far from what i want. i looked at the dxf info. for a point, and i see where there's another (10 . ) in an "AEC_SUBOBJECT". does anyone know how i could code it properly to pick the point and it give me the actualy insertion point, regardless of whether i have moved the label or not?

here is the dxf info:

Quote
((-1 . <Entity name: 7ec9c478>) (0 . "AECC_POINT") (330 . <Entity name:
7ed44fa8>) (5 . "A5F") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "0")
(284 . 1) (100 . "AecDbEntity") (102 . "{AEC_SUBOBJECT") (300 . "AeccImpPoint")
(100 . "AecImpObj") (3 . "") (100 . "AecImpEnt") (171 . 0) (100 . "AecImpGeo")
(10 73.3783 74.5606 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 . 4) (11 39.3828 66.5885
0.0) (302 . "ep") (301 . "") (300 . "") (280 . 0) (303 . "ep") (304 . "") (305
. "") (10 39.3828 66.5885 0.0) (285 . 0) (286 . 0) (170 . 3) (141 . 5.0) (306 .
"STANDARD") (140 . 5.0) (282 . 1) (283 . 1) (284 . 1) (171 . 2) (172 . 1) (173
. 3) (287 . 1) (142 . 0.0) (288 . 1) (102 . "AEC_SUBOBJECT}") (102 .
"{AEC_NULLOBJECT}") (100 . "AecDbGeo") (100 . "AeccDbPoint"))

and here is the code i have right now that will pick my point and give me the insertion point back:
(the reason i'm using ssget is so i can take advantage of pickfirst)

Code: [Select]
(defun layer_line (/ ss dwg count ent desc inspoint)
(setq ss (ssget ":S" '((0 . "AECC_POINT"))))
(if ss
(progn
(setq dwg (vla-get-activedocument (vlax-get-acad-object)))
(setq count -1)
(< (setq count (1+ count)) (sslength ss))
(setq ent (entget (ssname ss count)))
(setq desc (strcase (cdr (assoc 302 ent))))
(setq InsPoint (cdr (assoc 10 ent)))
(pt_layer_matcher)
);progn
);if ss
(princ)
);defun

any help on this would be greatly appreciated.
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: issues with assoc 10 of an AECC_POINT
« Reply #1 on: June 04, 2008, 04:38:38 PM »
lol, i just saw it. you just use assoc 11.
nevermind.
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox