field-p

Discussion in 'AutoCAD' started by Jason Piercey, Jan 4, 2005.

  1. Anyone have thoughts/comments they want to share?

    ; function to determine if a field
    ; has been applied to an object.
    ; Arguments:
    ; [object] - vla-object
    ; return: vla-object, IAcadObject or nil
    ; Notes:
    ; First stab at doing anything with fields
    ; unsure if this function will cover all
    ; instances that are possible.
    (defun field-p (object / result)
    (if
    (and
    (= :vlax-true (vla-get-hasextensiondictionary object))
    (setq
    result
    (vl-catch-all-apply
    (function
    (lambda ()
    (vla-item
    (vla-getextensiondictionary object)
    "Acad_field")))))
    (not (vl-catch-all-error-p result)) )

    (vla-item result 0)
    )
    )
     
    Jason Piercey, Jan 4, 2005
    #1
  2. Great, Luis. Glad you find it useful.
     
    Jason Piercey, Jan 5, 2005
    #2
  3. Jason Piercey

    Murph Guest

    I may find it useful someday after I get some of our engineers off of R2000i
    and up to R2005. In the mean time is gets saved in the hold folder with a
    lot of others.

    Murph
     
    Murph, Jan 5, 2005
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.