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

ProMdlGtolVisit returns PRO_TK_E_NOT_FOUND for drawings

Highlighted

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

9 REPLIES 9
Highlighted

RE: ProMdlGtolVisit returns PRO_TK_E_NOT_FOUND for drawings

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



Regards.

Highlighted

RE: ProMdlGtolVisit returns PRO_TK_E_NOT_FOUND for drawings

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

Highlighted

RE: ProMdlGtolVisit returns PRO_TK_E_NOT_FOUND for drawings

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

Highlighted

ProMdlGtolVisit returns PRO_TK_E_NOT_FOUND for drawings


Hi Shreeshail,

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

Ben
Highlighted

RE: ProMdlGtolVisit returns PRO_TK_E_NOT_FOUND for drawings

Hello Ben,



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



Thanks & Regards,


Shreeshail

Highlighted

RE: ProMdlGtolVisit returns PRO_TK_E_NOT_FOUND for drawings

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

Highlighted

ProMdlGtolVisit returns PRO_TK_E_NOT_FOUND for drawings

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]
Highlighted

RE: ProMdlGtolVisit returns PRO_TK_E_NOT_FOUND for drawings

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 ??.

Highlighted

RE: ProMdlGtolVisit returns PRO_TK_E_NOT_FOUND for drawings

Patrick,



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



Regards,


Shreeshail

Announcements