Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
Not sure if this is in the right place, but here goes.
I am trying to find a simple way to prompt a warning when certain design conditions exist. We use layouts to configure large models. It is possible for somebody to configure a unit that may cause interferences or other issues. without getting into too much detail about the specifics, I am simply looking for a way to prompt a dialog box or some sort of warning to tell a user, "hey, you better check this, it may not be something, but it could be".
In the most basic terms, If parameter X is a certain value, or could be a combination of parameters, bring up a dialog box or really anything that would allow a specific message to be displayed. Could even be a message in the message area at the bottom of the screen, but from my understanding, that would be done in toolkit, and I am looking for something through relations and ProProgram. I am not looking for any additional software of plug-ins, etc.
I have been able to do this with ProProgram Input statements, but I do not like this because for it to work, it brings up "Menu Manager" > Prompts user to click "Current Vals" / "Enter" / "Read File" > Assuming they click "Enter" then they have to check the box of the parameter used > "Done Select" > And only then, does the input box display with the message.
This works because once you get to the input box, I can finally display the message that can say something like "does this interfere?" and for this method, my plan is simply to add programming so that "N" would stop the prompt from being displayed and "Y" would continue prompting. I am not really looking for somebody to acknowledge based on "Y" or "N", but rather just display the message. There would need to be some type of prompt so that the message doesn't continue to come up, but with this method, I just don't like all the menus and boxes you have to check.
We use a few parts that prompt like this, so an assembly may have a few parts that have input promts built in, and if we know that we don't have to change any of the parameters on this specific unit, we typically just quickly click through all the prompts with "Current Vals" so a user may not even notice that this particular input was for a message about possible interference, since the menu manager looks all the same until you actually go through each one.
Sorry for the long post, and thanks for any help.
There is nothing in Creo relations that will allow you to create a pop up dialog box (in the traditional sense.) For that you would need to do some type of custom programming in VBA, J-Link, Toolkit, etc. The only possible workaround I'm aware of it to intentionally create an invalid constraint. For example, copy this text to the relations dialog, close the dialog, and then regenerate the model.
PARAM = 1 PARAM == 2 /* Display special message
You should see something like this:
Hopefully that's enough to get someone's attention.
@TomU wrote:
There is nothing in Creo relations that will allow you to create a pop up dialog box (in the traditional sense.) For that you would need to do some type of custom programming in VBA, J-Link, Toolkit, etc. The only possible workaround I'm aware of it to intentionally create an invalid constraint. For example, copy this text to the relations dialog, close the dialog, and then regenerate the model.
PARAM = 1 PARAM == 2 /* Display special messageYou should see something like this:
Hopefully that's enough to get someone's attention.
Thanks for that tip. Say our administrator was able to create something in toolkit, do you know if it were possible then for a Creo user to create relations and programming to work with it, or would it strictly need to be updated and developed within toolkit? We have one person here who handles the toolkit programming and it wouldn't be feasible for him to have to be in change of updating any messages etc.
I really don't know what Toolkit is capable of. I guess if he could hook into relations execution then maybe he could intercept certain custom commands and do something with them (like create a pop up), but I really don't know. Maybe post that question over on the Creo Parametric Customization board.
MikeJ85,
Since you are using a layout, create your relations in the layout to define a flag message. Along the lines of:
IF (LENGTH == 5.00)
MESSAGE="Caution: blah blah blah"
else
MESSAGE=" "
endif
In your part/assembly that is declared to the layout, create a note annotation that displays the string parameter "MESSAGE". Assuming your users have annotations displayed, they should see the message.
If your warning message is wordy, you can always have the message reference some other source for the lengthy message: "Warning: see note ### in the layout <layoutname>." Including the warning messages in the layout is also a good idea since the layout may be controlling multiple models.
If you truly wish to have a message pop up, you can setup a mapkey for the users to run as a design check. The mapkey can export the model parameters, launch a system window that runs a script to evaluate the parameters, and displays a message (or messages). The message can be displayed with something as simple as:
msg %username% < message_5.txt
The complexity of the mapkey will be driven by how/where you have the layout data driving the models (at the part level, sub-assembly level, or top assembly level).
Regards,
Dan N.
I have played around with this, but I have been unable to figure out how to get the value of the parameter to be displayed in the annotation feature. I thought maybe simple as &MESSAGE, but that didn't work. ("MESSAGE" being the parameter.) Any help would be greatly appreciated. Searching yielded me nothing....
Looking for something else in the KB, I stumbled across this:
https://www.ptc.com/en/support/article?n=CS119037
The title is misleading.
It is possible to drive the display of Cosmetic features using the IF - ELSE - ENDIF conditions via Pro/Program. Perhaps displaying cosmetic text would work for you as another option.
Regards,
Dan N.
I tested the parameter display as well, and apparently, the notebook driven parameters don't display in note annotations. The work around is to create a relation in the part. MY_MESSAGE=MESSAGE and use MY_MESSAGE in the note annotation.
Dan N.