Message 1 of 2
Adding Angles through the API

Not applicable
05-15-2009
11:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello.
i've so far managed to add dimensions to my drawingviews for the straight lines using the GeneralDimensions.addlinear method and its working out fine. (See Screenshot)
But i'm having problems trying to put angular dimensions.
here's a little bit of the code :
'oTableauDrawingCurves(6) is an array that is used to store the straight lines
Set oIntent1 = oSheet.CreateGeometryIntent(oTableauDrawingCurves(0), _
kGeometryIntent) ' DrawingCurve from 1st Segment
Set oIntent2 = oSheet.CreateGeometryIntent(oDrawingCurves(1), _
kGeometryIntentt) 'DrawingCurve from 2nd Segment
Set oPointOrigins = oDrawingCurve.CenterPoint
Set oDimension = oGeneralDimensions.AddAngular(oPointOrigins, oIntent1, oIntent2 , True, True, False)
i've tried the same fucntion this time supplying oIntent1 as the line1 start point, oIntent2 as the line 2 End Point and a third intent that is the drawingcurve for the circle using its CenterPoint as the third intent, and the function does work, but the angle is crooked, and reads sometimes 92', sometimes 98', other times it will be 93' etc.
Is it not possible to suppy 2 intent (aka, the 2 segments) and get the angle dimension that way? Is it the kGeometryIntent that is causing problems?
Any help is appreciated!
Thanks
Edited by: jeanph4@hotmail.com on May 15, 2009 6:12 PM
ps: Ok i've found it. The correct Intent to pass is the parent of the drawingcurve segment you want.
so in the above example
Set oIntent1 = oSheet.CreateGeometryIntent(oTableauDrawingCurves(0), _
oTableauDrawingCurves(0).Parent) ' DrawingCurve from 1st Segment
It seems that's the correct way to write that you want the whole segment to be choosen, rather than just a point. Edited by: jeanph4@hotmail.com on May 15, 2009 6:25 PM
i've so far managed to add dimensions to my drawingviews for the straight lines using the GeneralDimensions.addlinear method and its working out fine. (See Screenshot)
But i'm having problems trying to put angular dimensions.
here's a little bit of the code :
'oTableauDrawingCurves(6) is an array that is used to store the straight lines
Set oIntent1 = oSheet.CreateGeometryIntent(oTableauDrawingCurves(0), _
kGeometryIntent) ' DrawingCurve from 1st Segment
Set oIntent2 = oSheet.CreateGeometryIntent(oDrawingCurves(1), _
kGeometryIntentt) 'DrawingCurve from 2nd Segment
Set oPointOrigins = oDrawingCurve.CenterPoint
Set oDimension = oGeneralDimensions.AddAngular(oPointOrigins, oIntent1, oIntent2 , True, True, False)
i've tried the same fucntion this time supplying oIntent1 as the line1 start point, oIntent2 as the line 2 End Point and a third intent that is the drawingcurve for the circle using its CenterPoint as the third intent, and the function does work, but the angle is crooked, and reads sometimes 92', sometimes 98', other times it will be 93' etc.
Is it not possible to suppy 2 intent (aka, the 2 segments) and get the angle dimension that way? Is it the kGeometryIntent that is causing problems?
Any help is appreciated!
Thanks
Edited by: jeanph4@hotmail.com on May 15, 2009 6:12 PM
ps: Ok i've found it. The correct Intent to pass is the parent of the drawingcurve segment you want.
so in the above example
Set oIntent1 = oSheet.CreateGeometryIntent(oTableauDrawingCurves(0), _
oTableauDrawingCurves(0).Parent) ' DrawingCurve from 1st Segment
It seems that's the correct way to write that you want the whole segment to be choosen, rather than just a point. Edited by: jeanph4@hotmail.com on May 15, 2009 6:25 PM