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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

issues using UIShowMessageDialog method and options

Laetitia.M
4-Participant

issues using UIShowMessageDialog method and options

I am using Creo Parametric Release 4.0 and DatecodeM140

Hello, I am trying to show a message in creo window with a pop up dialog box as described in page 44 of the vb api user guide for creo 4.0, but I have two issues with it :
1 : although the method is supposed to allow not having any options, when I try just show my message with no options I get an Null exception error raised because the options are not given.

2 : There is no clear explaination on how to create the options and use the different option methods like the DefaultButton or MessageDialogType for instance. Is it possible to provide more detailed explanations on how to create a message with a pop up dialog box ? Maybe with actual examples.

Thank you for your help.

Here are the errors that I faced
System.NullReferenceException was unhandled by user code
HResult=-2147467261
Message=Object reference not set to an instance of an object.
Source=CreoParam7VbApiFullAsyncSpr
StackTrace:
at CreoParam7VbApiFullAsyncSpr.CreoParam7VbApiFullAsyncSprTester.TestBtnListener.OnCommand() in [project_path]\CreoParam7VbApiFullAsyncSprTester.vb:line 86
InnerException:

1 ACCEPTED SOLUTION

Accepted Solutions

Hi, thanks for the input, but after posting, I ended up finding this bug report of the Message method simply not working with Creo 4.0, and it says there's no plan to fix for creo 4.0.
Article - CS221957 - pfcSession.UIShowMessageDialog() does not work properly in Creo Parametric 3.0 (ptc.com)
I think once I can switch to a newer version it will be available. For now I work around this issue by using the VBA MsgBox instead, it does the job for what I need.

View solution in original post

2 REPLIES 2

Hi, thanks for the input, but after posting, I ended up finding this bug report of the Message method simply not working with Creo 4.0, and it says there's no plan to fix for creo 4.0.
Article - CS221957 - pfcSession.UIShowMessageDialog() does not work properly in Creo Parametric 3.0 (ptc.com)
I think once I can switch to a newer version it will be available. For now I work around this issue by using the VBA MsgBox instead, it does the job for what I need.

Top Tags