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

Need to set user defined error message using pro-program

MN_10300829
3-Newcomer

Need to set user defined error message using pro-program

I need a support to get some information on Creo pro-programing as I'm working on this topic for one of the projects to change the model according to new design specification up on regeneration which will run by the program.

As of now, I have made the program using parameter relations which will create the required models based on the parameter's entry as per the design specifications and it is working well.

 

The program is written in such a way that it will pop up the error message window if we enter wrong or incorrect values as inputs but after that it will ask for to continue regeneration or abort the changes as in the attached snap.

If we give yes to continue regeneration, still program could be able to create model with incorrect parameter values. But can we restrict this regeneration or set user defined error message saying that the entered values are incorrect please try to enter correct input values blah blah ……?

2 REPLIES 2

If I understand what you're trying to do, it seems you want to preserve a "state" of the model that you can revert back to if the user decides to abort the modification process?

To do something like that, you could save copies of the starting values from the model, then reset them if an abort is chosen by the user. But, if it were me, I'd prefer not to touch the model until the user has completed their modifications. Therefore, I'd set up parameters that will contain the "new" values, like newLength, newWidth, etc. As the program progresses the values the user enters are stored in these new parameters. Once they're done and give the okay, you then apply all the new parameter values and regenerate the model. If they abort, you do nothing with all the previous inputs.

now it's working as you mentioned like parameter values, but I want to setup an error message in the information window page which will pop-up once wrong values entered.

Announcements


Top Tags