Quantcast
Channel: PTC Community: Message List
Viewing all articles
Browse latest Browse all 11560

Re: Making a conditional statements in "pesd_startup" or "user input line"...

$
0
0

Hi Gary,

 

You're on the right track -- you just need to adjust the way you're asking about the objects.  If you know what the name of the object is, you want to ask the system if an object with that name exists.  In this case, you don't want to do anything if it doesn't exist, so you can use "when" rather than "if" (fyi, the counterpart of "when" is "unless").

 

The following should work:

 

(when (oli:sd-pathname-to-obj "/w1")  (delete_3d "/w1"))

(when (oli:sd-pathname-to-obj "/p1")  (delete_3d "/p1"))

 

Does that help?

 

Good luck!

 

andy


Viewing all articles
Browse latest Browse all 11560

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>