Skip to main content
7-Bedrock
May 9, 2025
Solved

Get GTOL (Feature control frames) in VBA.

  • May 9, 2025
  • 2 replies
  • 746 views

We want to get details of every GTOL (Feature control frames) created in on the every sheet (sheet wise).

 session.GetModelWindow(model).Activate()

 sheet = model

 Dim drawing = CType(model, IpfcDrawing)
 Dim nsheets = drawing.NumberOfSheets

 Dim sheetData = drawing.GetSheetData(1)
 Dim test = drawing.ListItems(EpfcModelItemType.EpfcITEM_ANNOTATION_ELEM)
 Dim mItem = CType(sheet, IpfcModelItemOwner)

 Dim feats = mItem.ListItems(EpfcModelItemType.EpfcITEM_GTOL)


But we cant get any GTOL in feats.
We tried quering dimensions, we get those dimensions. but from mulitple sheets.

How can i get GTOLs. how we can understand to which sheet they belong.

Best answer by DM_3062498

As per the answer here, we cant get Geometric Tolerance object using VB. 
https://www.ptc.com/en/support/article/CS63551

2 replies

Community Manager
May 15, 2025

Hello @DM_3062498

 

Thank you for using PTC Community.

Your questions has not received a response so far. 
In order to receive meaningful responses from other community members, could you please provide more details and context regarding your inquiry? Specifically:
 

  1. Are you working with a specific CAD software version or Windchill integration?
  2. Have you checked if GTOLs are stored differently compared to other annotations?
  3. Have you tried listing all annotation elements and filtering for GTOLs separately? This might help isolate the issue.

This will enhance the likelihood of receiving valuable assistance from other Community members.

You might also find it useful to refer to this informative video on how to ask a good question
I hope this information is helpful.

Best Regards,
Vivek N
Community Moderation Team.

DM_30624987-BedrockAuthorAnswer
7-Bedrock
July 22, 2025

As per the answer here, we cant get Geometric Tolerance object using VB. 
https://www.ptc.com/en/support/article/CS63551