- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Good Day All. i am having an issue with deleting constraints from a sketch. we have a bunch of parts that have a sketch projected to them from another part in the assembly. this is working fine, except it is slow due to the linking to the source part. so i am working on a rule to delete them. however, they do not show up as geometricConstraints in the part file
Dim act_doc As PartDocument act_doc = ThisApplication.ActiveDocument Dim oDef As PartComponentDefinition oDef = act_doc.ComponentDefinition Dim cut_sketch As PlanarSketch Try cut_sketch = oDef.Sketches.Item("BEVEL_CUT") LOGGER.Debug("FOUND SKETCH") Catch EX As Exception Logger.Debug("NO SKETCH") End Try Logger.Debug(cut_sketch.GeometricConstraints.Count) Dim ON_EDGE As GeometricConstraint For Each ON_EDGE In cut_sketch.GeometricConstraints Logger.Debug(ON_EDGE.Type) Next
. when i run the rule as shown below, it tells me there are 0 constraints. if i add other entities/constraints to the sketch and run the rule, it gives me a proper count so I'm pretty sure the rule is OK. what i find interesting is that if I hit F8, the Glyphs show on the screen, so it seems like they are some type of constraint, but not a Geometric Constraint? i only see dimensional constraints and geometric constraints for a sketch so i'm not sure where to go....
i've attached a sample part file.....
thanks in advance for looking, and of course for any insight or help!!
Solved! Go to Solution.