cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Create error message

cbell-3
1-Newbie

Create error message

Is it possible to have an error message window pop up in a regen? I'm creating a drawing that takes user inputs and updates an assembly/drawing, but I want to have some built in failsafe so if the part does not fall within my program that it will tell the user.


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.
4 REPLIES 4
JLG
1-Newbie
1-Newbie
(To:cbell-3)

I'm not sure if this will do what you want, but it's an idea.  You can add a standalone conditional statement that "asserts" that something is true; when violated, you'll get a popup.  For example, say we set N to 2 in the relations.  Then we assert that it's value is equal to 3.

When you regenerate, you'll see something like this:

Other than that, I'm not sure if you can do a popup without doing some Toolkit or J-Link programming.

Chris3
20-Turquoise
(To:cbell-3)

You could create a sketch that had parameter driven text. In the relations you could set parameter WARNING to be empty ("") unless certain conditions were met and then change it to a text string. Something like this:

IF 1 == 1

     WARNING = ""

ElSE

     WARNING = "ERROR CODE 1234: A STRANGE AND MYSTERIOUS EVENT HAS OCCURED, CHECK RELATIONS"

ENDIF

cbell-3
1-Newbie
(To:Chris3)

That's what I figured, I'll probably do this so I can avoid external programs being used.

Thanks!

Colin,

if you want to check input values and display warning in specific case, then you need external application linked to Creo. You can use AutoIt to develop it and interconnect with Creo using mapkey. There are plenty of another platforms which enable to develop external application, for example Visual Basic, J-Link, Toolkit.

MH


Martin Hanák
Top Tags