I want to read the workpoints and parts used to add dimension in the drawing. Using VBA I can get workpoints using <Dimension>.IntentOne.Geometry.AttachedEntity. However I have not seen any way to read it in VB.NET.
Can anybody please suggest me the way to read it?
Solved! Go to Solution.
the similar code should be also work in VB.NET. did you get any error or failure? I used the following code, it works well to me. It is a code within a standalone application. It asks user to select a dimension and pop out the information of the attaced entity if it is a workpoint.
Private Sub test()
Dim m_inventorApp As Inventor.Application = Nothing
m_inventorApp = System.Runtime.InteropServices.Marshal.GetActiveOb
Catch ex As Exception
' Get a feature selection from the user
Dim oObject As Object
oObject = m_inventorApp.CommandManager.Pick(SelectionFilterE
If TypeOf oObject Is LinearGeneralDimension Then
Dim oDrawDim As LinearGeneralDimension = oObject
Dim oAttEntity As Object = oDrawDim.IntentOne.Geometry.AttachedEntity
If TypeOf oAttEntity Is WorkPoint Then
Dim oWP As WorkPoint = oAttEntity
MsgBox("pt x,y,z" & oWP.Point.X & "; " & oWP.Point.Y & "; " & oWP.Point.Z)
Autodesk Developer Technical Services
Developer Technical Services
Autodesk Developer Network