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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

ModelCHECK Custom Check - Clean Up Function

pwilliams-3
11-Garnet

ModelCHECK Custom Check - Clean Up Function

All,
Does anyone have an example (that's better than the PTC example) of a
custom check? I am interested in how you allocated the ProArray of wide
strings (wchar_t**) for the results table and additionally how you cleaned
it up.

Patrick Williams
Sr. Systems Engineer II
Mechanical Engineering Solutions
Missile Systems
Raytheon Company

+1 520.545.6995 (business)
+1 520.545.6399 (fax)
-

TU/M12/8
6221 S Palo Verde Rd
Tucson, AZ 85706 USA
www.raytheon.com



This message contains information that may be confidential and privileged.
Unless you are the addressee (or authorized to receive mail for the
addressee), you should not use, copy or disclose to anyone this message or
any information contained in this message. If you have received this
message in error, please so advise the sender by reply e-mail and delete
this message. Thank you for your cooperation.

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.
1 REPLY 1
FV
17-Peridot
17-Peridot
(To:pwilliams-3)

Hi all,

Patrick,

To my recollection, User Guide is missing information regarding url and table arguments to ProModelCheckFunction.

I had used PRO_PATH_SIZE for url argument wchar_t * url =(wchar_t*) calloc( PRO_PATH_SIZE, sizeof( wchar_t));

and an array of PRO_LINE_SIZE strings for the table argument, the trick is to pass number ofresults countto the ProArrayAlloc.

something like this

err = ProArrayAlloc(numb_checks, sizeof(ProWstring), 1,(ProArray*)&table);

for( i = 0; i<numb_checks;i++) {<br="/>table [i] = (wchar_t*) calloc (PRO_LINE_SIZE, sizeof (wchar_t));}

the same numb_check variable should be used to set the result_count argument to the function

*result_count = numb_checks;

Feliks.



In Reply to Patrick Williams:

All,
Does anyone have an example (that's better than the PTC example) of a
custom check? I am interested in how you allocated the ProArray of wide
strings (wchar_t**) for the results table and additionally how you cleaned
it up.

Patrick Williams
Sr. Systems Engineer II
Mechanical Engineering Solutions
Missile Systems
Raytheon Company

+1 520.545.6995 (business)
+1 520.545.6399 (fax)
-

TU/M12/8
6221 S Palo Verde Rd
Tucson, AZ 85706 USA
www.raytheon.com



This message contains information that may be confidential and privileged.
Unless you are the addressee (or authorized to receive mail for the
addressee), you should not use, copy or disclose to anyone this message or
any information contained in this message. If you have received this
message in error, please so advise the sender by reply e-mail and delete
this message. Thank you for your cooperation.
Top Tags