TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Biscuits on July 02, 2015, 11:23:50 AM
-
Hello everyone...hopin' to get a little help from my friends.
In the following code each of the first three lines of code work fine to acquire an attribute for modifying.
I need to comment out two of the three for the routine they reside in to work.
I'm constantly changing the ":" to accommodate the situation.
Hope I'm making sense here.
The last line of code is my attempt to combine the first three into one. But, no go.
Any ideas?
Thanks in advance
(if (= (cdr (assoc 1 (entget ename))) "---")
:(if (= (cdr (assoc 1 (entget ename))) "MM/DD/YY")
:(if (= (cdr (assoc 1 (entget ename))) "XX/XX/XX")
(if (= (cdr (assoc 1 (entget ename))) "---" "MM/DD/YY" "XX/XX/XX")
-
or?
(if (or (= (cdr (assoc 1 (entget ename))) "---")
(= (cdr (assoc 1 (entget ename))) "MM/DD/YY")
(= (cdr (assoc 1 (entget ename))) "XX/XX/XX")
)
;;; do stuff here
)
-
OMG....I have vapor-lock on the brain these days!
Works perfectly!
Thank you, Keith..............drinks on me!
-
And another :
(if (vl-position (cdr (assoc 1 (entget ename))) '("---" "MM/DD/YY" "XX/XX/XX"))
;;; do stuff here
)
-
One more:
-
Thanks for the replies, gang!
Obviously more than one way to skin the kat!