Enable Export parameter for multiple parts

m_morcielago
Enthusiast
Enthusiast

Enable Export parameter for multiple parts

m_morcielago
Enthusiast
Enthusiast

Hello everyone 

I have lots of inventor files that created in sheet metal and all of them have "Thickness" parameter 

But none of them don't have "Export parameter check"

So how can I check it for all part of assembly by one click 

Maybe iLogic can do itScreenshot 2023-08-16 194206.png

0 Likes
Reply
Accepted solutions (1)
308 Views
3 Replies
Replies (3)

pcrawley
Advisor
Advisor

Yep - iLogic to the rescue!

 

You can create an external rule containing this code:

 

oThickness = Parameter.Param("Thickness")
oThickness.ExposedAsProperty = True

(You can test it by running it locally on any Sheet metal file)

 

Download the "iLogic Tool Batch Rule" from the Autodesk app store: iLogic Rule Batch Tool | Inventor | Autodesk App Store

 

In the batch tool, select all the files in which you want to expose "Thickness" (they go in the left pane) and select your new iLogic rule in the right pane - then run it.

Peter
0 Likes

A.Acheson
Mentor
Mentor
Accepted solution

As @pcrawley suggests some ilogic could make that easy for you. Here is a rule to expose the parameter in all sheetmetal parts. 

 

This is untested so save work before running. 

 

    ' Get the active assembly.
    Dim asmDoc As AssemblyDocument = ThisApplication.ActiveDocument
    ' Get all of the referenced documents.
    Dim refDocs As DocumentsEnumerator = asmDoc.AllReferencedDocuments

    ' Iterate through the list of documents.
    For Each refDoc As Document In refDocs
Dim refDef As ComponentDefinition = refDoc.ComponentDefinition
If
refDoc.IsModifiable = True _
AndAlso refDef.Type = ObjectTypeEnum.kSheetMetalComponentDefinitionObject Then

Dim thickness As Inventor.Parameter
= refDef.Parameters.Item("Thickness")
If thickness.ExposedAsProperty = False Then
thickness.ExposedAsProperty = True
End If
End If
Next

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan

m_morcielago
Enthusiast
Enthusiast

So I have to run it in Assembly?

0 Likes