iLogic Block Swapping

As part of their iLogic design Automation, one of our clients asked for some code today to swap Autodesk Inventor sketch blocks within their part sketches as they pick different options within their dialog boxes.  

iLogic Block Swapping

I remembered I'd had the same request a few years ago and dregged up my old code and found a video of it ... Do you remember when Inventor looked like this?

I thought this code could still be of use to more than one of you and so here is the basic version of it:


'Symetri iLogic

Dim oPartDoc As PartDocument

      oPartDoc = ThisApplication.ActiveDocument

Dim oCompDef As PartComponentDefinition

      oCompDef = oPartDoc.ComponentDefinition

Dim oSketches As PlanarSketches

      oSketches = ThisApplication.ActiveDocument.ComponentDefinition.Sketches

Dim oSketch As PlanarSketch

      oSketch = oSketches.Item(“Profile”)

oSketch.Edit

oSketch.sketchblocks.item(1).delete

Dim oSketchBlockDef As SketchBlockDefinition

      oSketchBlockDef = oCompDef.SketchBlockDefinitions.Item(TABLE_PROFILE)

Dim oPosition As Point2d

      oPosition = ThisApplication.TransientGeometry.CreatePoint2d(0, 0)

’ Insert the sketch block definition

oSketch.SketchBlocks.AddByDefinition(oSketchBlockDef, oPosition)

oSketch.exitedit


If its of interest and you want to push it further then please get in touch. I do love a good bit of Automation awesomeness! ;)

iLogic is part of Autodesk Inventor and Inventor Professional.


5 Ways Chaos Is Using AI to Transform Design Visualisation

28 January 2026

Artificial intelligence is reshaping the way Architects, Designers, and Visualisation professionals bring ideas to life. Chaos, a global leader in rendering and visualisation technology, is at the forefront of this transformation. By integrating AI into its ecosystem of tools - Veras, Enscape, V-Ray, Corona, and Vantage - Chaos is streamlining workflows, accelerating creativity, and redefining what’s possible in design visualisation. This blog explores 5 ways Chaos solutions are supporting AI technology.

Chaos V-Ray vs Chaos Corona: Which Renderer Fits Your Workflow?

21 January 2026

Visualisation has changed dramatically over the past twenty five years. With so many powerful tools now available, choosing the right rendering engine has become a crucial decision for architects, designers, and visualisation specialists. Among the leading options, Chaos offers two standout solutions - Chaos V-Ray and Chaos Corona - each delivering exceptional photorealism in its own way. This blog outlines how they compare.

Including Visualisation as Part of Your BIM Strategy

19 January 2026

I am sure we have all heard the question “are you a visual learner” at some point, this is because today there is a greater appreciation that most of us learn and understand the world around us, including new concepts more easily via visuals.