
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
i wanna making a extrusion from every select line in Part
/code
Public Sub test()
Dim oPartdoc As PartDocument
Set oPartdoc = ThisApplication.ActiveDocument
Dim oCompDef As PartComponentDefinition
Set oCompDef = oPartdoc.ComponentDefinition
Dim oSelectSet As SelectSet
Set oSelectSet = oPartdoc.SelectSet
If oSelectSet.Count = 0 Then
Exit sub
end if
Dim oSketch As PlanarSketch
Set oSketch = oCompDef.Sketches.item(1)
Dim oSketchLine As SketchLine
Set oSketchLine = oSelectSet.item(1)
Dim oSketch As Sketch
Set oSketch = oSketchLine.Parent
Dim oProfile As Profile
Set oProfile = oSketch.Profiles.AddForSurface
Dim oCutExtrude As ExtrudeFeature
Set oCutExtrude = oCompDef.Features.ExtrudeFeatures.AddByDistanceExtent(oProfile, 1, PartFeatureExtentDirectionEnum.kSymmetricExtentDirection, PartFeatureOperationEnum.kSurfaceOperation)
end sub
/code
so this code dosent work any one can help me please
thx
Solved! Go to Solution.