Hallo Basti,
der code von Deiner letzten Frage etwas erweitert:
Public Sub AddAngleConstraint()
Dim oApp As Application
Set oApp = ThisApplication
Dim oDoc As PartDocument
Set oDoc = oApp.ActiveDocument
Dim oSketch As PlanarSketch
Set oSketch = oDoc.ActivatedObject
Dim oLine1 As SketchLine
Dim oLine2 As SketchLine
Set oLine1 = oSketch.SketchLines.Item(1)
Set oLine2 = oSketch.SketchLines.Item(2)
Dim oTG As TransientGeometry
Set oTG = oApp.TransientGeometry
Dim oPt2D As Point2d
Set oPt2D = oTG.CreatePoint2d(1#, 0#)
Dim oAngConstr As TwoLineAngleDimConstraint
Set oAngConstr = oSketch.DimensionConstraints.AddTwoLineAngle(oLine1, oLine2, oPt2D)
Dim oUom As UnitsOfMeasure
Set oUom = oDoc.UnitsOfMeasure
Dim ang As Double
ang = oUom.GetValueFromExpression("60", kDefaultDisplayAngleUnits)
oAngConstr.Parameter.Value = ang
oDoc.Update
End Sub
Gruesse,
Paul
www.morecam.ch/cad.htm
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP