Difference between revisions of "Arcs"

From Microstation VBA Wiki
Jump to: navigation, search
(Created page with 'The CreateArcElement1 function is easiest for 2D drawings because it only requires three points: starting and ending points along the arc along with the center of the arc. <PRE>…')
 
 
(One intermediate revision by the same user not shown)
Line 11: Line 11:
 
Set oArc = CreateArcElement1(Nothing, ptStart, ptOrigin, ptEnd)
 
Set oArc = CreateArcElement1(Nothing, ptStart, ptOrigin, ptEnd)
 
ActiveModelReference.AddElement oArc
 
ActiveModelReference.AddElement oArc
 +
</PRE>
 +
 +
When showing an arc for an angle callout, you place arrowheads on the ends of the arc. To correct the angle of the arrowhead (rather than place the arrowhead at the angle of a tangent at the end of the arc), apply a correction factor based on the length of the arrowhead and the radius of the arc, where atn() is the arctangent:
 +
 +
<PRE>
 +
deltaAngle = atn(length_arrowhead/arc_radius)
 
</PRE>
 
</PRE>

Latest revision as of 15:11, 17 August 2010

The CreateArcElement1 function is easiest for 2D drawings because it only requires three points: starting and ending points along the arc along with the center of the arc.

Dim ptStart As Point3d
Dim ptEnd As Point3d
Dim ptOrigin As Point3d
Dim oArc As ArcElement
Set oArc = CreateArcElement1(Nothing, ptStart, ptOrigin, ptEnd)
ActiveModelReference.AddElement oArc

When showing an arc for an angle callout, you place arrowheads on the ends of the arc. To correct the angle of the arrowhead (rather than place the arrowhead at the angle of a tangent at the end of the arc), apply a correction factor based on the length of the arrowhead and the radius of the arc, where atn() is the arctangent:

deltaAngle = atn(length_arrowhead/arc_radius)