Message 1 of 5
Unspecifed error in AddLinear

Not applicable
10-13-2008
12:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi friends,
I have implement following code(C#) to add linear dimension.But after execution, "Unspecifed error " message occured at AddLinear API. Can you please tell me what is the problem with code.
Point2d stPoint1 = m_inventorApp.TransientGeometry.CreatePoint2d(45.6113, 16.015);
Point2d endPoint1 = m_inventorApp.TransientGeometry.CreatePoint2d(45.6113, 18.515);
GeometryIntent top1 = oSheet.CreateGeometryIntent(endPoint1, PointIntentEnum.kEndPointIntent);
GeometryIntent bottom1 = oSheet.CreateGeometryIntent(stPoint1, PointIntentEnum.kStartPointIntent);
Inventor.DimensionStyle oDimStyle = m_inventorDrawingDoc.StylesManager.DimensionStyles[3];
Inventor.Layer oDimLayer = m_inventorDrawingDoc.StylesManager.Layers[21];
oSheet.DrawingDimensions.GeneralDimensions.AddLinear(endPoint1, top1, bottom1, DimensionTypeEnum.kVerticalDimensionType, true, oDimStyle, oDimLayer);
Thanks in Advance
Satyajeet
I have implement following code(C#) to add linear dimension.But after execution, "Unspecifed error " message occured at AddLinear API. Can you please tell me what is the problem with code.
Point2d stPoint1 = m_inventorApp.TransientGeometry.CreatePoint2d(45.6113, 16.015);
Point2d endPoint1 = m_inventorApp.TransientGeometry.CreatePoint2d(45.6113, 18.515);
GeometryIntent top1 = oSheet.CreateGeometryIntent(endPoint1, PointIntentEnum.kEndPointIntent);
GeometryIntent bottom1 = oSheet.CreateGeometryIntent(stPoint1, PointIntentEnum.kStartPointIntent);
Inventor.DimensionStyle oDimStyle = m_inventorDrawingDoc.StylesManager.DimensionStyles[3];
Inventor.Layer oDimLayer = m_inventorDrawingDoc.StylesManager.Layers[21];
oSheet.DrawingDimensions.GeneralDimensions.AddLinear(endPoint1, top1, bottom1, DimensionTypeEnum.kVerticalDimensionType, true, oDimStyle, oDimLayer);
Thanks in Advance
Satyajeet