Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am really confused on the error I am getting when using GetInspectionDimensionData(). If I select a dimension which has inspection data turned on already:
Dim shape As InspectionDimensionShapeEnum
Dim label As String
Dim rate As String
Dim oObject As Object
oObject = oDrawingDoc.SelectSet.Item(1)
oObject.GetInspectionDimensionData(shape, label, rate)
I get:
Type mismatch. (Exception from HRESULT: 0x80020005 (DISP_E_TYPEMISMATCH))
Yet if I change it slightly to SetInspectionDimensionData(), and set values to the three variables, it works no problem:
Dim shape As InspectionDimensionShapeEnum = kAngularEndsInspectionBorder
Dim label As String = "2"
Dim rate As String = "1"
Dim oObject As Object
oObject = oDrawingDoc.SelectSet.Item(1)
oObject.SetInspectionDimensionData(shape, label, rate)
So based on using Set instead of Get, I think I have the variable types set correctly...
Solved! Go to Solution.