Friday, 16 June 2017

Turn Routes On/Off

                It has finally caught up with me and I had to stop and write a code to turn Routes On/Off.

                Nothing fancy here but I found myself doing this so many times on this last project that I decided to make an iLogic external rule for it.

                This is very simple; just a few lines to check if the occurrence name starts with "Route" then turn the part off.

Dim oAssyDoc As AssemblyDocument
oAssyDoc = ThisApplication.ActiveDocument

Dim oAsmCompDef As AssemblyComponentDefinition
oAsmCompDef = oAssyDoc.ComponentDefinition

Dim oLeafOccs as ComponentOccurrencesEnumerator
oLeafOccs = oAsmCompDef.Occurrences.AllLeafOccurrences

Dim oOcc as ComponentOccurrence

'get user input as True or False
wfBoolean = InputRadioBox("Turn Routes On/Off", "On", "Off", False, "iLogic")

' Process the rule, wrapping it in a transaction so the
' entire process can be undone with a single undo operation.
Dim trans As Transaction
trans = ThisApplication.TransactionManager.StartTransaction( _
        oAssyDoc, "Routes On/Off")

    For Each oOcc In oLeafOccs
        If String.Compare(Left(oOcc.Name,5),"Route",False) = 0 Then
            oOcc.Visible = wfBoolean
        Else If String.Compare(Left(oOcc.Name,4),"Hose",False) = 0 Then
            oOcc.Visible = wfBoolean
        End If
'end transaction for single undo

'upate the files



Monday, 22 May 2017


Not much is going on here at the moment in regards to blogging because I am over my head with work and various other bits that need attention.

However, I did stop by to share a link and give you something to read while I try to get on top of things.

As it happens Markus has contacted me just like most of you in regards to Inventor Tube and Pipe and couple of months later he has decided to follow my advice and share his wisdom and findings on all things, CAD.

He has just finished his first 3 parts post on CADSHIP and I urge you to take a look as I found it quite interesting.  Some will find the benefits and will probably investigate this further or just follow along with him on this but his first post is all about VR / AR, in particular about:

If you are native German speaking then you’ll fit right in, for the rest of us there’s a Translate button top right.

He is now working his way to an AR app... which no doubt will end up on his blog.


Thursday, 6 April 2017

Break all cross-part sketch projections

Short and sweet: How to Break Link on cross-part projections for all occurrences in an assembly.

I have mine disabled and I don't create cross-part references. that will slow inventor to a halt, especially on large assemblies.

When you change to Modeling View inside assembly you can select and delete more than one links at a time but only if they are part of the same sketch

Here is the ilogic code used to break adaptivity. Please run this code from an Assembly, internal or external rule

Dim oAsmDoc As Document 
oAsmDoc = ThisApplication.ActiveDocument

If oAsmDoc.DocumentType <> kAssemblyDocumentObject Then
    MessageBox.Show("Run this rule from an assembly!", "iLogic")
End If


For Each oDoc As Document In oAsmDoc.AllReferencedDocuments
  If oDoc.ModelingSettings.AdaptivelyUsedInAssembly = True Then
   oDoc.ModelingSettings.AdaptivelyUsedInAssembly = False
   i += 1
  End If
 End Try

MessageBox.Show("Turned off adaptivity for " & i & " documents!", "iLogic")
Please see the screencast example here:

photo credit: Chatsy POP.H chain (license)

Monday, 3 April 2017

Drawing Resource Transfer Wizard 2017 - Incorrect Font

Short and sweet again. No time for prelude.

If you use Drawing Resource Transfer Wizard 2017 to update title blocks for multiple drawings, text fonts would be changed incorrectly.

It is a known issue in 2017 and on Release 3 Update 1 still not working. 

Release 4 is around the corner (April release) and I was told it's fixed but till then or if we have a regression and this bug returns here is an ilogic code to automate this.

The Knowledge Base Article recommends updating manually each drawing ....hmmm... we can do better:

Dim oDestinationDocument As DrawingDocument
oDestinationDocument = ThisApplication.ActiveDocument

Dim oSourceDocument As DrawingDocument
oSourceDocument = ThisApplication.Documents.Open("D:\ADS\CAD\TEMPLATE.idw")
' Get the new source title block definition.
Dim oSourceTitleBlockDef As TitleBlockDefinition
oSourceTitleBlockDef = oSourceDocument.TitleBlockDefinitions.Item("TITLEBLOCK_NAME")
' Get the new title block definition.
Dim oNewTitleBlockDef As TitleBlockDefinition
oNewTitleBlockDef = oSourceTitleBlockDef.CopyTo(oDestinationDocument,True)'true to replace existing
' Iterate through the sheets, replace tibleblock with the one newly added.
Dim oSheet As Sheet
For Each oSheet In oDestinationDocument.Sheets
 Call oSheet.AddTitleBlock(oNewTitleBlockDef)
Use code Injector from here:
to update multiple files at once. There is no point to run it from the assembly (not in my case) because not all files are part of the same assembly.
photo credit: PeterThoeny Space and time warp (license)

Friday, 10 March 2017

Hide TP Work Features

Concentrated shot on TP Work Features:

Tube and Pipe Routes will create a lot of work points for routing and workp lanes for constraining the route.

Those work points are created above the route sketch but inside the route part.

The route has work points / work planes and a 3D sketch where you define your path.

You can turn then off from within the main assembly or when editing the route but if you deleted those route segments as you do when you change route path then those workpoints and worplanes will become orphaned and can't be turned off except for my method shown here.

This is particularly annoying when using zoom all because Inventor will include these work features in the zoom operation instead of zooming to existing geometry.

Google has big issues getting the right size pictures and videos to show up.

if the next video si poor quality, try my screencast here:



Wednesday, 8 March 2017



My name is Adrian and I am a WORKAHOLIC.

Now you should say:

Nice to meet you Adrian we are too...

I am busy to a ridiculous level, at the moment I wake up at 5AM and go to bed at 10PM or later and it’s pretty much all work and commuting.

+Paul Munford told me that’s why he got out of London but I am still stuck doing the commuting and I have to do it at weird times to keep it ~2 hours total for the day.

That leaves me not extra time, for you here, YouTube, Autodesk Forum, etc. which is not good and I will just have to adapt, adjust and reconsider my help.

From now on I will need to give you concentrated shots like espresso instead of the usual moka or pumpkin spiced skinny latte with marshmallows and whipped cream.

A short description, some screenshots and if I’m lucky, a video.



Saturday, 7 January 2017


I’ve been toying with the idea of an open library for a long time. I am of course referring to an open library of Inventor resources, parts, iparts, ifeatures, tube & pipe fittings, content center libraries, illogic routines and snippets, customization files, manuals, links, etc.

my type of place to be...

In other words anything Inventor related. There are a lot of websites out there where you can find cad files and resources and I’ve shared my preferred list before so why go through all the trouble and effort of doing this instead of using the already existing services?

                More than anything I am driven to share a library of parts authored as TP fittings ready to use in your projects.

                I feel that there are not enough T&P users out there to drive growth and force Autodesk to rethink its portfolio. A lot of people don’t use TP because of lacking resources like manuals, libraries etc.

                Not sure if you are aware but the new collections presented by Autodesk suck and I was better off with suites that we had before. Why? Because I had the Factory Design Suite which had AutoCAD P&ID, Inventor with routed systems, Plant 3D, etc..

                Now we either get Inventor (PRODUCT DESIGN COLLECTION), or we get AutoCAD P&ID and Plant 3D (ARCHITECTURE, ENGINEERING & CONSTRUCTION COLLECTION) but nothing in between.

                I bet there aren’t many companies are out there who manage to do plants without the need to create skids (inventor frame generator, FEA, etc.). Most of our plants are either containerized, skids, cabinets or enclosure type of installation.

                Everyone expects modular systems which they can rip and throw when they want instead of having a myriad number of pipe routes, fittings and equipment spawning over several rooms, floors, buildings.

                  With this in mind I wanted to see if we can find a solution and share the knowledge but it would do us no good if we don’t collectively share our files so my question to you is:

                Would you be willing to share your library of fittings? Other Inventor resources?

                I have sent my entire library out more than once and I’ve only asked that you use it at your own risk. Some might argue the benefits of this but I can tell you they pay off and I got lots of messages on fixing various errors which would have proven difficult to find otherwise.

                Second part of the problem is where, how to store and share this.

                I was thinking to use a single DropBox, Google Drive, Name Your Preferred Here, online storage systems and they would just be a list of folds with all the parts which you can download as a whole or partially.

                This however requires a business account (size wize) and while I can pay for this myself it needs to live outside me and outlive my personal carrier.

                Who knows, I might win the lottery and decide to do this for living but most likely I ... won’t and might need to change careers.

                I do suggest the download is available for those who make a small contribution, as small permitted, like 0.1 YourCurrency, just so that it’s still free but helps maintain it.

                If enough money are raised to sustain the storage then the excess would be used to hire someone and develop new libraries. We’ll do a pool and we vote for our most needed library, we find some students form a low cost labour part of the world and hire them to help us build it.

                We will also need a couple of administrators to oversee this and make sure the funds go to the right place, permissions are set, download links are working, etc..

                Have no idea if this will work, if I am asking too much, so I will end by asking you to please get in contact and give me your personal thoughts on the matter. What do you think will work, what won’t, are you willing to share your library, have some storage ideas, etc.


photo credit: loop_oh two doors (license)