Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Anonymous
407 Views, 2 Replies

[VBA] SetInspectionDimensionData Blank Label Issue

Gday all,

My goal is to create macros for everything I use the most so i can assign them single key hotkeys to boost my productivity. So I got the following code to set a dimension as an inspection with an angular border, but my issue is it creates a segment (vertical line) for the label even when the label it's set to be blank. Manually editing the dimension shows that the label is blank but if i press delete it removes the segment line.

 

 

Sub Dimension_Inspection()
  Dim oDoc As DrawingDocument
  Set oDoc = ThisApplication.ActiveDocument
  Dim oSSet As SelectSet
  Set oSSet = oDoc.SelectSet
  'reference to the selected dimension
  Dim oDim As LinearGeneralDimension
  Set oDim = oSSet.Item(1)
   
  Dim Shape As InspectionDimensionShapeEnum
  Dim Label As String
  Dim Rate As String
  Shape = kAngularEndsInspectionBorder
  Label = ""
  Rate = ""
  
  oDim.IsInspectionDimension = True
  oDim.SetInspectionDimensionData Shape, Label, Rate

End Sub

 ins.PNG

See the highligted segment. it's unnecessary and makes my drawings look inconsistant.