Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
ThomasRambach
313 Views, 5 Replies

iLogic to convert from Tube & Pipe to a normal part?

Is there an updated method (preferably in iLogic) for this?

https://www.autodesk.com/support/technical/article/caas/sfdcarticles/sfdcarticles/Remove-Tube-and-Pi...

 

The macro does not seem to do anything in Inventor 2023.

 

 

WCrihfield
in reply to: ThomasRambach

Just checking, but have you already tried the same technique from an iLogic rule?  Sometimes the 'ThisDoc.Document' reference will point to a different Document than the 'ThisApplication.ActiveDocument' reference will, and sometimes that makes all the difference.

Dim oProp As Inventor.Property = ThisDoc.Document.PropertySets.Item("32853F0F-3444-11d1-9E93-0060B03C1CA6").ItemByPropId(56)
oProp.Value = ""

Afterwards, another thing that you can check for, and maybe even remove, is the DocumentInterest (within Document.DocumentInterests) for the tube & pipe add-in.  You would just need the ClientID property value from the "Routed Systems: Tube & Pipe" add-in first, to use when checking for it.  That indicates whether that add-in had any part in the creation of the model, and may specify that something about the model is unique to that add-in.

 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

I think the issue is whatever property 56 was previously, does not exist anymore for this. The property can't be found when I run through all the available properties.

WCrihfield
in reply to: ThomasRambach

That property should still exist, but it might possibly be ReadOnly for some reason.  The regular name of the PropertySet is "Design Tracking Properties" (or "Project", if using iLogic snippet), and the Property name is "Categories".  It is at Index 36, and its PropID is 56.  The online documentation for that property says that it is ReadOnly, had no user interface way of accessing it, and will usually contain a String type value containing XML related data.  I have not used it for anything myself, but have seen several other similar posts about folks using it to get rid of a document's association with Content Center, Frame Generator, Tube & Pipe related add-ins before, so it must not always be ReadOnly.  They very likely need to update their online help documentation.  Attached is a PDF of an Excel spreadsheet I created for mapping out and documenting all the standard, and not so standard, but common iProperties.  I'm not saying that this is the only way to accomplish what you are trying to do...just saying that the iProperty should still be there, because it is a standard one that is present in all documents, within the third PropertySet.  Not all standard properties will be useful in all types of documents though, because some of them are document type specific, and may either be empty, or contain a value that is not useful for much.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

HI @ThomasRambach 

I did a quick test and was able to get this to work with Inventor 2023. See steps below, just in case this is a workflow issue ( I had to refresh my memory on how this all worked) .

 

Just to confirm the workflow:

  • I created a run with a fitting in a T&P assembly.
  • I used the Save and Replace to create a copy in a read/write location
    • Assemble tab > Productivity panel > Save and Replace 
    • This resulted in 2 fittings
  • I opened this new copy fitting part file by itself
  • Ran the Macro
  • Returned to the assembly and right clicked on it in the browser and confirmed the T&P options were no longer there
  • Right clicked on the original fitting in the browser and confirmed the T&P options were still there

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

 

 

Curtis_Waguespack_2-1698074893909.png

 

Curtis_Waguespack_1-1698074849419.png

 

 

 

 

 

 

I think it's working but not fully clearing what I need to clear. This still results in True:

 

DocumentInterests DocInst = mDoc.DocumentInterests;

bool bIsPipingRun = DocInst.HasInterest("{4D39D5F1-0985-4783-AA5A-FC16C288418C}");