
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I have problem with creating of a Rectangle in a sketch.
I would like to make a profile in assembbly and then make a "revolve".
Dim oAsmDoc As AssemblyDocument
Set oAsmDoc = ThisApplication.ActiveDocument
Dim oCompDef As AssemblyComponentDefinition
Set oCompDef = oAsmDoc.ComponentDefinition
Dim oSketch As PlanarSketch
Set oSketch = oCompDef.Sketches.Add(oCompDef.WorkPlanes(3))
Dim oTransGeom As TransientGeometry
Set oTransGeom = ThisApplication.TransientGeometry
'IT CRASHES HERE
'Set oRectangleLines = oSketch.SketchLines.AddAsTwoPointRectangle(oTransGeom.CreatePoint2d(0, 0), oTransGeom.CreatePoint2d(100, 0))
Dim oProfile As Profile
Set oProfile = oSketch.Profiles.AddForSolid
Dim oWorkAxis As Object
Set oWorkAxis = oCompDef.WorkAxes.Item(1)
Dim oRevoleveDef As RevolveFeature
Set oRevoleveDef = oCompDef.Features.RevolveFeatures.AddByAngle(oProfile, oWorkAxis, 360, kPositiveExtentDirection, kCutOperation)
Anybody who can help me?
Thanks!
Jiri
Solved! Go to Solution.