
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a few if statements that are at the top of my code that run if a certain variable is true. The problem i am having is the COND statement is running even know the condition is not met leaving some text on top of text. ln13 is a variable that gets created by another routine & is the state that the project is in. That part works, but the cond statement part is also being run & i am not sure why. The cities that are in the member call (ln7) are false when i dont choose NY but that code is still getting run.
(If (AND(= (strcase (GETVAR "PROJECTNAME")) "CDG")(= ln16 "BCK"))
(progn
(If (= ln13 "MD")
(Command "-layer" "s" "A-ANNO-TEXT" "" "insert" "H:\\Overlays\\BCK_McDonalds\\CoverinfoMD.dwg" "0,0" "1" "" "")
);end if MD
(If (= ln13 "PA")
(Command "-layer" "s" "A-ANNO-TEXT" "" "insert" "H:\\Overlays\\BCK_McDonalds\\CoverinfoPA.dwg" "0,0" "1" "" "")
);end if PA
(If (= ln13 "NJ")
(Command "-layer" "s" "A-ANNO-TEXT" "" "insert" "H:\\Overlays\\BCK_McDonalds\\CoverinfoNJ.dwg" "0,0" "1" "" "")
);end if NJ
(cond
((and (= ln13 "NY")
(member ln7 '("Manhattan" "Bronx" "Brooklyn" "Flushing" "Jackson Heights" "Queens" "New York" "Staten Island")))
(Command "-layer" "s" "A-ANNO-TEXT" "" "insert" "H:\\Overlays\\BCK_McDonalds\\CoverinfoNYC.dwg" "0,0" "1" "" "")
);cond 1
(t
(Command "-layer" "s" "A-ANNO-TEXT" "" "insert" "H:\\Overlays\\BCK_McDonalds\\CoverinfoNY.dwg" "0,0" "1" "" "")
);cond else
);cond
);end progn
(COMMAND "-MTEXT" "26.0466,16.8356" "S" "TITLE" "H" ".25" "J" "MC" "W" "" (STRCASE ln5) (STRCASE ln6) (STRCASE ln7a)"")
(COMMAND "QSAVE")
)
Solved! Go to Solution.