Message 1 of 4
Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))

Not applicable
10-13-2008
05:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Dear Friends,
when i try to set dimensionStyle "AlternateDisplayUnitType"property , sometimes it works fine and some times it gives "Unspecified Error"
Please let me know what is the problem with my code
when i try to set dimensionStyle "AlternateDisplayUnitType"property , sometimes it works fine and some times it gives "Unspecified Error"
Please let me know what is the problem with my code
Inventor.DimensionStyle oDimStyle = m_inventorDrawingDoc.StylesManager.DimensionStyles[3];
for (int ii = 1; ii <= s1.Count; ii++)
{
DrawingCurve s2 = s1[ii];
if (s2.CurveType == CurveTypeEnum.kLineSegmentCurve)
{
GeometryIntent top1 = oSheet.CreateGeometryIntent(s2, null);
Inventor.Layer oDimLayer = m_inventorDrawingDoc.StylesManager.Layers[21];
oSheet.DrawingDimensions.GeneralDimensions.AddLinear(endPoint1, top1, null,
DimensionTypeEnum.kVerticalDimensionType,
true, oDimStyle, oDimLayer);
}
}
oDimStyle.AlternateDisplayUnitType = false;
oDimStyle.LinearUnits = UnitsTypeEnum.kMillimeterLengthUnits;
Thanks & Regards,
Satyajeet