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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

ProMdlGtolVisit returns PRO_TK_E_NOT_FOUND for drawings

shreeshail_lokh
1-Visitor

ProMdlGtolVisit returns PRO_TK_E_NOT_FOUND for drawings

Hello All,



I'm trying to visit Geometric Tolerances in drawing usingProMdlGtolVisit function.


Although drawing contains Geomteric Tolerances the visit function is returning


PRO_TK_E_NOT_FOUND . I coudnt figure out why this is happening.If anybody


is aware of this or knows solution to this please let me know.Thanks in Advance.



Regards,


Shreeshail


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.
9 REPLIES 9

Could you please provide source code and the model of concern.



Regards.

Hello Andrey,



I am afraid I cannot upload the model but I can definitely upload the excerpt of the source code.


This source code has been written by following the directions given in tkuse.pdf. I tried running the


source code on plethora of drawings however its returningPRO_TK_E_NOT_FOUND for all.


Thanks a lot.



Regards,


Shreeshail

Hello William,



Thanks a lot for your reply.As suggested I prototyped the call back function in global varialbe section.However its still not working, I am getting the same error.



Regards,


Shreeshail


Hi Shreeshail,

Are the Gtols in the drawing associated with actual models, or are they
just "drawn" in?

Ben

Hello Ben,



Aplogies for late reply.The Gtols present in the drawings are coming from the model (instances of the model).



Thanks & Regards,


Shreeshail

Hello William,



Apologies for late reply.I am attaching the sample code where the action function is protoyped in the global section withsame arguments as the arguments in the function itself.However its not working ,please point out if I have done anything wrong.



Thanks & Regards,



Shreeshail

Shreeshail,
I looked up the API ProMdlGtolVisit() and it states the following:
The function ProMdlGtolVisit() visits geometric tolerances stored in a part, assembly, or drawing. The forms of the visit and filter functions are similar to those of most other visit functions--they receive a ProGtol pointer as input argument to identify the gtol.

But in your last email you said that the gtol data is stored within the instances of the model. In your code you passed a handle to the drawing to the visit function. That's why it's not working. You first need to get a handle to the model that is being used on the drawing. There are several ways of doing this depending on your situation. You can get a model handle by visiting drawing views or by getting the current drawing solid (ProDrawingCurrentsolidGet()).

Patrick Williams | Engineering Systems | c: 616.947.2110
[cid:image001.jpg@01CE628B.E2E7C7A0]

Patrick,



Thanks a lot for your reply.I worked accordingly & I did manage to find the Gtols.


However the gtol which I found were from models & same were used in the drawing.


But there are cases where there is gtol in the model ,however its not used in the drawing.


My question is,is there any way to figure out if the gtol present in the model is present in the


drawing associated with it ??.

Patrick,



I figured it out we can do this using 'ProAnnotationIsShown'



Regards,


Shreeshail

Announcements


Top Tags