modify feature with ilogic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
I have a question about modifying an existing feature with ilogic.
The most topics i can find have some ilogic code creating a feature but not modifying an existing one.
what i want i to have a sketch with a pattern in it. with ilogic i can modify the number of the pattern, but when this is a sketch pattern new profiles added in the sketch are not in the cut feature.
i think it should be something like this
Dim oProfile As Profile Dim oDef As ExtrudeDefinition On Error GoTo NoProfile 'oProfile = oSketch.Profiles.AddForSolid For Each oProfile In oSketch.Profiles oDef.Profile.Item.AddsMaterial = True Next
Dim oCut As ExtrudeDefinition oCut = oCompDef.Features.ExtrudeFeatures.Item("Extrusion2").Definition(oDef)
but this doesnt seem to work.
there is a good reason i want to use a sketch pattern in stead of a feautre pattern. it is possible that the cut is not entirly on the sheet metal part. when i make a cut and pattern that feature i think the model will have errors because possibly the cut isn't in the sheet, so the pattern doesnt work.
also i want to run the code from an higher level assembly, so i don't know if its possible to exclude ActiveDocument.
kind regards,
Geert