Hi,
I want to select all circles in the design to patch them. How do I do this in VBA? Drawing the circles is no problem.
Kind regards,
Bart
Solved! Go to Solution.
Solved by Vladimir.Ananyev. Go to Solution.
Could you please test this sample code. It works for me.
Private Sub BoundaryPatch_SketchCircle3D() Dim oDoc As PartDocument Set oDoc = ThisApplication.ActiveDocument Dim oDef As PartComponentDefinition Set oDef = oDoc.ComponentDefinition 'reference to 3d sketch Dim oSketch3d As Sketch3D Set oSketch3d = oDef.Sketches3D.Item(1) 'create Boundary Patch Definition Dim oBoundaryPatchDef As BoundaryPatchDefinition Set oBoundaryPatchDef = oDef.Features _ .BoundaryPatchFeatures.CreateBoundaryPatchDefinition 'Add all 3D circles to Boundary Patch Definition 'using Path object Dim oCircle3d As SketchCircle3D Dim oPath As Path For Each oCircle3d In oSketch3d.SketchCircles3D Set oPath = oDef.Features.CreatePath(oCircle3d) Call oBoundaryPatchDef.BoundaryPatchLoops.Add(oPath) Next ' Create the boundary patch feature based on the definition. Dim oBoundaryPatch As BoundaryPatchFeature Set oBoundaryPatch = oDef.Features _ .BoundaryPatchFeatures.Add(oBoundaryPatchDef) End Sub
Cheers,
Hello,
would this be possible to do with a 3D sketch that is made up of triangles (check screenshot)? What do I have to pass to the boundary patch object for it to create the boundary patches, where these triangles are?
Thanks
Omar
Can't find what you're looking for? Ask the community or share your knowledge.