- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello all, looking for a little help with an iLogic rule I'm working on.
Much of our work is structures fabricated from steel plate. One of our practices is to add a note " (SK) " to the description of plates that have a detailed sketch somewhere in the fab drawing set (simple rectangular or circular plates with no addtional features do not get these detailed sketches). The actual "detailed sketch" is just a dimensioned drawing view of that plate.
I've been working on automating this process so that Inventor can actually determine for the user whether or not the sketch is required. I have it in certain part templates by default. Other templates add the note automatically through iLogic when certain plate features are selected, or when the model consists of multiple part features.
This leaves one remaining case that the current set of rules can't catch - when the user creates cutouts, notches, etc. by modifying the sketch for the original extrusion. I have determined a method for catching that case, but haven't yet figured out how to program it.
What I want to do is count all of the lines, arcs, and circles in the first model sketch. If that count returns a number other than 4 lines, the note will be added. If any arcs are detected, the note will be added. If any circles are detected with lines also present, the note will be added. There may be other cases that will come up in testing that need to be covered, but I ran into an issue before I got that far. Construction geometry messes up the count - I need a way to exclude it.
Below is the test code I have so far for the counter. Please let me know what techniques I can use to get construction geometry out of the count. This code doesn't include the provisions for actually adding the note yet - I'm just trying to get the counter working right first. Instead it's just displaying the total count in a message box for test purposes.
oDoc=ThisDoc.Document
oSketch=oDoc.ComponentDefinition.Sketches.Item(1)
LineCount=oSketch.Sketchlines.count
CircleCount=oSketch.SketchCircles.count
ArcCount=oSketch.SketchArcs.count
TotalCount=LineCount+CircleCount+ArcCount
MessageBox.Show("Total Count "&TotalCount, "Title")
Solved! Go to Solution.