Community
I'm attempting to update some code so it works to automatically dimension a part instead of what it was originally written for, an assembly. The same points that are referenced for dimensioning exist in this part the same as they did in the assembly environment.
Below is the chunk that I'm currently stuck on. Any help would be greatly appreciated.
Dim oPartDocument As Inventor.PartDocument oPartDocument = thispart ' Array To Hold Instances of WorkPoints from WireFrame Dim oWPBox As New ArrayList For Each oDimPts As Inventor.WorkPoint In oPartDoc.ComponentDefinition.WorkPoints ' Only Loop throuhg DimPts from Wireframe to limit confusion with DB Points If (oDimPts.Name.Contains("Dim")) Then Dim oWPProxyHolder As Inventor.WorkPointProxy oPartDocument.CreateGeometryProxy(oDimPts, oWPProxyHolder) oView.SetIncludeStatus(oWPProxyHolder,True) oWPBox.Add(oWPProxyHolder) End If Next Call AddLinearDimensions(oDrawingDocument,oSheet,oWPBox) Call DefineDimensionFormat(oDrawingDocument, oSheet) End Sub
If you have no assembly then you can remove the proxy workpoint creation lines. You should work directly to include the workpoint object.
Can't find what you're looking for? Ask the community or share your knowledge.