I am trying to use Lisp or VBA to identify if the text value in an attribute was generated by a field. I have found the FieldCode method for Text and Mtext objects, but this method does not apply to attributes.
I am trying to use Lisp or VBA to identify if the text value in an attribute was generated by a field. I have found the FieldCode method for Text and Mtext objects, but this method does not apply to attributes.
Now, I have barely tried any programmatic manipulation
of fields but maybe this will help you get to where you
need to be? If not, just disregard.
(setq obj (vlax-ename->vla-object (car (nentsel))))
(if (= :vlax-true (vla-get-hasextensiondictionary obj))
(if
(vl-catch-all-error-p
(setq
result
(vl-catch-all-apply
(function
(lambda ()
(vla-item
(vla-getextensiondictionary obj)
"Acad_field"
)
)
)
)
)
)
(vl-catch-all-error-message result)
result
)
)
--
Autodesk Discussion Group Facilitator
"David Zavislan" <nospam@address.withheld> wrote in message
news:5127067.1104862936757.JavaMail.jive@jiveforum 1.autodesk.com...
Text and Mtext objects, but this method does not apply to attributes.I am trying to use Lisp or VBA to identify if the text value in an
attribute was generated by a field. I have found the FieldCode method for
Thanks Jason. Your solution will meet my immediate needs. I have a program that updates attributes in blocks, but I did not want it to modify attributes containing fields. Your code lets me test the attribute for a field.
I extracted the dictionary object that was returned with your code. It returned an AcadObject with the object name AcDbField. Are there any methods or properties associated with an AcDbField?
You can find out what methods are available
for a vla-object by dumping the object.
(vlax-dump-object <vla-object> t)
You might also see the thread I started yesterday
titled "field-p".
--
Autodesk Discussion Group Facilitator
"David Zavislan" <nospam@address.withheld> wrote in message
news:5197254.1104945236517.JavaMail.jive@jiveforum 1.autodesk.com...
attributes containing fields. Your code lets me test the attribute for aThanks Jason. Your solution will meet my immediate needs. I have a
program that updates attributes in blocks, but I did not want it to modify
field.
methods or properties associated with an AcDbField?I extracted the dictionary object that was returned with your code. It
returned an AcadObject with the object name AcDbField. Are there any