TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: e2002 on April 15, 2005, 04:25:01 AM

Title: how get FieldCode of a Attrib object in a insert object
Post by: e2002 on April 15, 2005, 04:25:01 AM
use vla-FieldCode can get Text ,Mtext obejct's Fieldcode ,but invalid in Attrib
Title: how get FieldCode of a Attrib object in a insert object
Post by: Mark on April 15, 2005, 07:04:03 AM
I can see no way of retrieving that info. The docs only mention FieldCode method for TEXT, MTEXT.

Quote

#<VLA-OBJECT IAcadAttributeReference 0c3ac424>
...
; Methods supported:
;   ArrayPolar (3)
;   ArrayRectangular (6)
;   Copy ()
;   Delete ()
;   GetBoundingBox (2)
;   GetExtensionDictionary ()
;   GetXData (3)
;   Highlight (1)
;   IntersectWith (2)
;   Mirror (2)
;   Mirror3D (3)
;   Move (2)
;   Rotate (2)
;   Rotate3D (3)
;   ScaleEntity (2)
;   SetXData (2)
;   TransformBy (1)
;   Update ()
Title: how get FieldCode of a Attrib object in a insert object
Post by: daron on April 15, 2005, 08:01:47 AM
FieldCode??? Is that a new one???

Why don't you explain what you're trying to do and maybe we could help you come up with a solution.
Title: how get FieldCode of a Attrib object in a insert object
Post by: e2002 on April 15, 2005, 09:12:39 PM
we known command "ddedit" can edit Text , MText ,Dimension , Insert include Attributes

about 2 years ago , i writen a program like ddedit , that can direct edit the Attributes in a Insert  object.

but now my AutoCAD upgrade to 2005/6 , and i use the new Field feature in the Attribs .

i want to enhance my old program to support the Field.

if ActiveX can't get the FieldCode , i have to try normal LISP (entget..... )
Title: how get FieldCode of a Attrib object in a insert object
Post by: e2002 on April 15, 2005, 09:53:19 PM
this is the code :
Code: [Select]

(setq esl  (nentsel)
      en   (car esl)
      el   (entget en)
      en_1 (cdr (assoc 360 el))
      el_1 (entget en_1)
      en_2 (cdr (assoc 360 el_1))
      el_2 (entget en_2)
      en_3 (cdr (assoc 360 el_2))
      el_3 (entget en_3)
      en_4 (cdr (assoc 360 el_3))
      el_4 (entget en_4)
)
Title: how get FieldCode of a Attrib object in a insert object
Post by: Mark on April 15, 2005, 10:02:51 PM
You get the actual Fieldcode with that?
Title: how get FieldCode of a Attrib object in a insert object
Post by: MP on April 15, 2005, 10:04:38 PM
I recall when I played with the 2005 beta that it was convoluted similar to that, I'll see if I can find my code (in my backups, as I just rebuilt my pc) ...