field-p
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
field-p

 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization
Author Message
Jason Piercey
Guest





Posted: Wed Jan 05, 2005 1:47 am    Post subject: field-p Reply with quote

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)
)
)

--
Autodesk Discussion Group Facilitator

Back to top
Luis Esquivel
Guest





Posted: Wed Jan 05, 2005 2:38 am    Post subject: Re: field-p Reply with quote

Perfect.....ohhhhhhhh!

I'm going to use this one..... thank you Jason.
Back to top
Jason Piercey
Guest





Posted: Wed Jan 05, 2005 8:04 pm    Post subject: Re: field-p Reply with quote

Great, Luis. Glad you find it useful.

--
Autodesk Discussion Group Facilitator



"Luis Esquivel" <nospam@address.withheld> wrote in message
news:41db0cc3$1_3@newsprd01...
Quote:
Perfect.....ohhhhhhhh!

I'm going to use this one..... thank you Jason.



Back to top
Murph
Guest





Posted: Wed Jan 05, 2005 8:46 pm    Post subject: Re: field-p Reply with quote

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

"Jason Piercey" <Jason AT atreng DOT com> wrote in message
news:41dc01ed$1_2@newsprd01...
Quote:
Great, Luis. Glad you find it useful.

--
Autodesk Discussion Group Facilitator



"Luis Esquivel" <nospam@address.withheld> wrote in message
news:41db0cc3$1_3@newsprd01...
Perfect.....ohhhhhhhh!

I'm going to use this one..... thank you Jason.



Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB