Hi.
Appologise to Lee that i ask question here regarding the functions publish on your site.
Anyone are wellcome to comment.
LM attribute function link
http://lee-mac.com/attributefunctions.htmlRegarding the
LM:GetAttributeValue attribute functions
Im using these function extensively, but the way im using it is to have one pair of these functions (LM:GetAttributeValue + calling function) for each attribute TAG checking ie (setq IsTag1 ..) and i have 13 pairs of these function to check 13 different TAGS. I use these routine to check if a TAG exist, i know the purpose of these routine is to get the attribute value.
My question is either how to combine the main and calling function into one or even better to have multiple TAG checking into one function.
ie
(if (eq tag (strcase (vla-get-Tagstring attrib)))
(setq IsTag1 (vla-get-TextString attrib))
(setq IsTag2 (vla-get-TextString attrib))
(setq IsTag3 (vla-get-TextString attrib))
etc.
calling function
(LM:GetAttributeValue
(vlax-ename->vla-object (ssname ss 0))
"TAG1"
"TAG2"
"TAG3"
etc.
I mod the the code so no user input require and provide a variable so icould use later.
(vla-get-TextString attrib)
replace with
(setq IsTag1 (vla-get-TextString attrib))
(vlax-ename->vla-object (ssname ss 0)) (getstring "\nSpecify Tag String: ")
replace with
(vlax-ename->vla-object (ssname ss 0)) "TAG1"