How do I prevent ILogic in templates from running when used for frame generator

How do I prevent ILogic in templates from running when used for frame generator

skotzur
Contributor Contributor
280 Views
1 Reply
Message 1 of 2

How do I prevent ILogic in templates from running when used for frame generator

skotzur
Contributor
Contributor

Hey all,

I'm just getting my feet wet with iLogic and made some basic forms and rules which help populate some iproperties when new files are created and saved. They work well and I'm happy with them.

 

One undesirable behavior is that frame generator uses the standard.iam and standard.ipt to create the frame assembly and frame reference model. We don't maintain iProperties for these files, so the iLogic forms and rules are undesirable in this instance.

 

My workaround was to create two more templates called "standard do not use.ipt" and "standard do not use.iam" which don't have the rules and forms in them. Frame generator uses these as they are alphabetically before "standard.ipt" and "standard.iam". Great, but it clutters up the "new file" dialogue box. However, if I browse to these files in windows explorer and right click>Properties I can check the "Hidden" box and this removes them from the new file dialogue box, but frame generator still uses them. Great! but unfortunately when the templates are checked into vault and then retrieved by other users the files are no longer hidden. This means that any time someone gets the templates they would have to re-hide these two files.

 

Anyone have any ideas for me?

0 Likes
281 Views
1 Reply
Reply (1)
Message 2 of 2

bradeneuropeArthur
Mentor
Mentor

Hi,

You only would like to run  these rules when it is a normal inventor model file, correct?

 

Then use this:

Public Sub main()

If ThisApplication.ActiveDocument.PropertySets.Item("Content Library Component Properties").DisplayName <> "" Then
'THEN RUN YOUR CODE HERE
End If
End Sub

Regards,

 

 

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes