Looking for Advice - iLogic drawn parts & revisions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
(Currently using 2023.4)
I have developed several part templates that provide user inputs (stored to Parameters) and I use iLogic to quickly handle the sketches and features of the various parts. These parts have many options (bends, # of holes, size of holes, location of holes, angles, etc...)
I originally started with pre-drawn features and using iLogic to handle suppression of features that were not required for the current design. The benefit to this approach was that on drawings, dimensions & notations remained dynamically available and updated with any changes to the design. The downside was that suppressed features would often fail to constrain/resolve in the suppressed sketch and cause errors (design doctor activates) and would often interrupt the operation of the iLogic code.
I'm now using iLogic to generate sketches for only the features needed and generating the required loft/extrusion/bend/etc. to create the finished part. For simplicity, any revision process erases all sketch entities and regenerates all new entities based upon the updated part features and values. While this eliminates all issues with suppressed sketches that fail to resolve (since they no longer exist), all sections, details, dimensions, constraints & notations become dissociated on the drawing and are removed by Inventor for anything related to that part, requiring a complete redo of all this work.
For constraints, I have developed custom work planes/axis/points as constraint features and these I do not delete, but rather re-define their origin points to get them to relocate as needed. For example:
'top plane Found = False For Each oWorkPlane In oCompDef.WorkPlanes If oWorkPlane.Name = "Top Plane" Then Found = True Next PlanePoint(1) = oTG.CreatePoint(0, Height / 2 * 2.54, 0) PlanePoint(2) = oTG.CreatePoint(1, Height / 2 * 2.54, 0) PlanePoint(3) = oTG.CreatePoint(0, Height / 2 * 2.54, -1) midLine = oTG.CreateLineSegment(PlanePoint(1), PlanePoint(2)) oAxisX = midLine.Direction midLine = oTG.CreateLineSegment(PlanePoint(1), PlanePoint(3)) oAxisY = midLine.Direction If Found Then oWorkPlane = oCompDef.WorkPlanes.Item("Top Plane") oWorkPlane.SetFixed(PlanePoint(1), oAxisX, oAxisY) oWorkPlane.Grounded = True Else oWorkPlane = oCompDef.WorkPlanes.AddFixed(PlanePoint(1), oAxisX, oAxisY, False) oWorkPlane.Grounded = True oWorkPlane.Name = "Top Plane" End If
Unfortunately this didn't pan out as this workflow is also causing constraints placed to these work features to be lost. Constraints to World work features does hold true, fortunately.
I've attempted to create a copy of the part to be changed, made edits, and then used the component replace option in attempt to prevent the loss of these dynamic links, but that too fails to work and my dimensions & notations are still being lost on paper.
My theory is that each sketch entity and/or feature is given an address value within Inventor and this is used as the dynamic link to dimensions, notations, details & sections.
What's a workflow I can use that will allow me to make updates to a parts design and be able to keep the dynamic association all the way through to the drawing files. Is the only path to first evaluate every sketch entity to modify that entity? This workflow would be quite the nightmare considering all the variations in features and locations I would have to evaluate & handle; so I hope there's a better path forward than this.
