- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello all,
I have thought myself to create automated models and drawings thanks to this amazing forum but now i have run into a problem which seems like it hasn't come up yet. I am trying to create a dimension between two points on a Flat Pattern (examle in the added screencap) using WorkPoints from the folded model, since it doesn't seem to work at all with WorkPoints from the Flat Pattern. Below is the code that i am trying to use. In red is the SetIncludeStatus which is the line where the problems seem to be.
Dim oSheet As Sheet = ThisDoc.Document.ActiveSheet Dim oView As DrawingView = ActiveSheet.View("VIEW1").View Dim oDoc As Document = oView.ReferencedDocumentDescriptor.ReferencedDocument Dim oGeomIntent01 As Inventor.GeometryIntent Dim oWP01 As Inventor.WorkPoint = oDoc.ComponentDefinition.WorkPoints.Item("WP_1") oView.SetIncludeStatus(oWP01, True) Dim oCenterMark01 As Inventor.Centermark oCenterMark01 = oSheet.Centermarks.AddByWorkFeature(oWP01, oView) oGeomIntent01 = oSheet.CreateGeometryIntent(oCenterMark01, kPoint2dIntent) oCenterMark01.Visible = False Dim oGeomIntent02 As Inventor.GeometryIntent Dim oWP02 As Inventor.WorkPoint = oDoc.ComponentDefinition.WorkPoints.Item("WP_2") oView.SetIncludeStatus(oWP02, True) Dim oCenterMark02 As Inventor.Centermark oCenterMark02 = oSheet.Centermarks.AddByWorkFeature(oWP02, oView) oGeomIntent02 = oSheet.CreateGeometryIntent(oCenterMark02, kPoint2dIntent) oCenterMark02.Visible = False Dim textPoint As Inventor.Point2d = ThisServer.TransientGeometry.CreatePoint2d(oView.Left + (oView.Width) + 1, oView.Top - (oView.Width / 2)) Dim oDim As GeneralDimension oDim = oSheet.DrawingDimensions.GeneralDimensions.AddLinear(textPoint, oGeomIntent01, oGeomIntent02, DimensionTypeEnum.kHorizontalDimensionType)
Without the WorkPoints included in the View I cannot create my dimension.
I have tried using Workplanes and the edges by using attributes but I cannot get this to work either.
The only way I have been able to make this work is by using a view of the folded model which is not ideal.
Does anyone know how to create a dimension from points on a Flat Pattern?
Thank you in advance,
Jeffrey
Solved! Go to Solution.