
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Can anyone help?? I have managed to creat (copy !) a sub which draws a rectangle with input from a form - Length and Width -- with the code below
' Draw a rectangle with the corner at (0,0)
Dim oRectangleLines As SketchEntitiesEnumerator
Set oRectangleLines = oSketch.SketchLines.AddAsTwoPointRectangle( _
oTransGeom.CreatePoint2d(0, 0), _
oTransGeom.CreatePoint2d(Length, Width))
I am having a problem putting dimensions on the sketch so those dims appear in the parameters.
I have managed to do it with a single line ( see code below) but cannot fathom out what part of the rectangle I can use as points to position the start and finish of the dimension line.
Note... oLines(1) was the line drawn and oTextPt(1) was defined before the code below to position the dim text
' Create a length dimension
Dim oLengthDim(1 To 3) As DimensionConstraint
'Set oLengthDim(1) = oSketch.DimensionConstraints.AddTwoPointDistance(oLines(1).StartSketchPoint, _
'oLines(1).EndSketchPoint, kAlignedDim, oTextPt(1), False)
Thanks in anticipation Dave (Newbie)
Solved! Go to Solution.