Making a conditional statements in "pesd_startup" or "user input line"...
My goal is to create an IF / THEN / ELSE statement in LISP.
To test this I tried to delete "/w1" and "/p1" at startup. (Since some users may have their system to automatically add these at startup.)
At a basic level, this works in some cases:
- delete_3d "/w1" complete
- delete_3d "/p1" complete
But if they dont have "/w1" or "/p1" loaded, then it will create an error trying to delete something that isn't there,
So I tried to make a conditional statement:
I tried this, but after many variations, I had no luck creating an "ELSE" part of the statement
- (if "/w1" (delete_3d "/w1") ( ? )) ;; IF "/w1" exists delete it, If it doesn't exist, NIL - End statement and continue
- (if "/p1" (delete_3d "/p1") ( ? ))
Does anyone have a solution for this?
This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.

