Globel form , is it possible to get it to turn rules on and you after the document you have open ?

Globel form , is it possible to get it to turn rules on and you after the document you have open ?

Darkforce_the_ilogic_guy
Advisor Advisor
843 Views
4 Replies
Message 1 of 5

Globel form , is it possible to get it to turn rules on and you after the document you have open ?

Darkforce_the_ilogic_guy
Advisor
Advisor

bt_0-1608122847751.png

I an building an Globel form .. my problem is that not all are them can be use in any document... is there a way to turn stuff on and off .... base on documente type ? or an I force to make sure the code are not running in the ilogic code ?... the last thing I do know how to do ... but I would like to do it the other way

0 Likes
844 Views
4 Replies
Replies (4)
Message 2 of 5

WCrihfield
Mentor
Mentor

Unfortunately, iLogic forms don't yet support conditional formatting/layout.  If you need the formatting or layout of the form to be conditional, you must either use VBA UserForm (designed within the VBA Editor) or a regular Windows Form created and designed from scratch within your iLogic/vb.net code.  I have an example of a regular Windows Form that is entirely created, designed, and used, with reactions to events that happen to the form, while it is open, all from a single iLogic rule.  Here is the link to my contribution post.

 

If this solved your problem, or answered your question, please click ACCEPT SOLUTION.
Or, if this helped you, please click 'LIKE' 👍.

If you have time, please... Vote For My IDEAS 💡and Explore My CONTRIBUTIONS

Inventor 2021 Help | Inventor Forum | Inventor Customization Forum | Inventor Ideas Forum

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 5

A.Acheson
Mentor
Mentor

@Darkforce_the_ilogic_guy 

 

If your looking to disable the tabs/rules in the form you can use a user parameter in the document as boolean.

The down side is this parameter  needs to be in every document as the global form behaviour only looks at the user parameter in the document.

I was able to do a document check and have the global form disable the tab based on document type while running an on open event trigger.

  

That might work for you. 

 

Alan

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

_dscholtes_
Advocate
Advocate

@Darkforce_the_ilogic_guy wrote:

 or an I force to make sure the code are not running in the ilogic code ?... the last thing I do know how to do ... but I would like to do it the other way


When a user can run a rule without using your form, I would suggest to build in a document check.

(I use VBA for my tools and I have some code that does 'start-up checks' in every tool. Document type is one of the checks)

0 Likes
Message 5 of 5

WCrihfield
Mentor
Mentor

Good catch @A.Acheson , I forgot about that one.  I use that technique for some of my forms too, I just haven't had to limit my forms due to document type before.  Besides having to create that special boolean type user parameter in all the possible target documents to make this work, you may also want to set up an additional iLogic rule in each of the documents that inspects the document and ensures that parameter is set the way you want it.  And since there are more than two document types, but only two possible settings for a boolean parameter, the rule will have to define which of the many document types will cause the parameter to be either True or False.

   You could use an external iLogic rule to 'inject' the parameter into the other documents.  If you decide to create a rule to control the parameter, depending on if you choose put a local iLogic rule into each document or create a single external rule, then use then add that external rule to the Event Triggers for each document, that can likely all be done with the same rule that injects the parameter.  That is if you are still planning on staying with the iLogic Global Form route.

 

If this solved your problem, or answered your question, please click ACCEPT SOLUTION.
Or, if this helped you, please click 'LIKE' 👍.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)