offset a new planar sketch projected geometry edge

offset a new planar sketch projected geometry edge

cencinaNB2ET
Advocate Advocate
516 Views
1 Reply
Message 1 of 2

offset a new planar sketch projected geometry edge

cencinaNB2ET
Advocate
Advocate

Hello All,

 

I create a new sketch on an extrusion face with projected edges

Then i simply want to offset the boundary line of that sketch

I cant find anything similar anywhere that can collect those lines and offset it.

 

Here is what i have so far in Ilogic:

 

SyntaxEditor Code Snippet

Dim oPart As PartDocument
oPart = ThisDoc.Document

Dim oCompDef As ComponentDefinition
oCompDef = oPart.ComponentDefinition
Dim oExtrude As ExtrudeFeatures
oExtrude = oCompDef.Features.ExtrudeFeatures
Dim oFaces As Faces
oFaces = oExtrude.Item(1).Faces


Dim oSketch As PlanarSketch
Dim oSketch_1 As PlanarSketch
Dim oSketch_2 As PlanarSketch


'' This Just checks if the sketcj is already there...
For y = 1 To oCompDef.Sketches.Count
oSketch_1 = oCompDef.Sketches.Item(y)
If InStr(oSketch_1.Name, "SIAPS") > 0 Then
GoTo Endcode
End If
Next y


''Create the sketch
oSketch = oCompDef.Sketches.Add(oFaces(1), True)





Dim oSketchObjects As ObjectCollection
oSketchObjects = ThisApplication.TransientObjects.CreateObjectCollection
Dim oSketchEntity As SketchEntity




For y = 1 To oCompDef.Sketches.Count
oSketch_1 = oCompDef.Sketches.Item(y)
If InStr(oSketch_1.Name, "Sketch") > 0 Then
'MessageBox.Show(oSketch_1.Name)
oSketch_1.Name = "SIAPS"
oSketch_1.Edit()

For Each oSketchEntity In oSketch_1.SketchEntities
If oSketchEntity.Type = 83898880 Then
oSketchObjects.Add(oSketchEntity)
'MessageBox.Show(oSketchEntity.Type)
End If
Next



Call oSketch_1.OffsetSketchEntitiesUsingDistance(oSketchObjects, 2, True, True)

oSketch_1.ExitEdit()
Exit For
End If
Next y









Endcode :
iLogicVb.UpdateWhenDone = True

 

0 Likes
Accepted solutions (1)
517 Views
1 Reply
Reply (1)
Message 2 of 2

cencinaNB2ET
Advocate
Advocate
Accepted solution

Sorry got it..

 it was just False, False

 

Call oSketch_1.OffsetSketchEntitiesUsingDistance(oSketchObjects, 2, False,False)
0 Likes