Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ilogic shortcut key

61 REPLIES 61
SOLVED
Reply
Message 1 of 62
Ktelang
8796 Views, 61 Replies

ilogic shortcut key

Hello,

 

Is there any command/option to add a keyboard shortcut for ilogic rule ?

Thanks

------------------------------------------------------------------------------
Config :: Intel (R) Xeon (R) CPU E31245 @ 3.30 GHz, 16.0 GB, 64bit win7
Inventor 2013 and Vault Basic 2013
-----------------------------------------------------------------------------
61 REPLIES 61
Message 41 of 62
nikhunter
in reply to: Ktelang

Is ti strange that in macros category i dont have nothing.....Smiley Tongue

 

How can i enter a Key in a column at macro category??

Message 42 of 62
MjDeck
in reply to: nikhunter

Did you put all your VBA code into your ApplicationProject?
It must be in the ApplicationProject, instead of in the document.


Mike Deck
Software Developer
Autodesk, Inc.

Message 43 of 62
nikhunter
in reply to: MjDeck

I forgot to tell you tha i am amatuer at Autodesk Inventor...

 

How can i  put all  VBA code into my ApplicationProject

Message 44 of 62
MjDeck
in reply to: nikhunter

Here is a screenshot of the VBA Editor.  The ApplicationProject is at the top left.  Copy and paste your code from where you have it now (maybe in Module1 of the DocumentProject) into Module1 of the ApplicationProject.

 

ApplicationProject.png


Mike Deck
Software Developer
Autodesk, Inc.

Message 45 of 62
nikhunter
in reply to: Ktelang

Ok i did that.

Now i can find my macro in macros category...

And now what???

 

Message 46 of 62
nikhunter
in reply to: Ktelang

Ok Mike i think i done it....I will try a liitle bit by myself because i feel that i tired you, and if i have another question i will be back.....

I realy thank you and appriciate all your help.....

Message 47 of 62
MjDeck
in reply to: nikhunter

OK, great. I forgot one thing: you should set an option so that the VBA macros are available all the time.

Under Application Options
Check the Load VBA on start-up  option

 

LoadVbaOnStartup.png


Mike Deck
Software Developer
Autodesk, Inc.

Message 48 of 62
nikhunter
in reply to: Ktelang

Hmmmm.Mike  i have autodesk 2011 and i dont have any of this setting...Look at Yourself

 

 

Message 49 of 62
nikhunter
in reply to: Ktelang

Finally i enter a shortcut Key on a macro as you say...

But how it can be activated???I mean when i can press the button "A" for example, and run my macro???

I must do somethimg else???It's about this setting you send me???

Message 50 of 62
MjDeck
in reply to: nikhunter

You don't need the Load VBA on start-up option in Inventor 2011.  But it is required in Inventor 2013 (and maybe 2012).

If your macro is not working, I don't know what the problem might be. I would recommend using two letters instead of one for your shortcut. Please send me a screenshot similar to the one below:


SetKeyboardMacro.png

 


Mike Deck
Software Developer
Autodesk, Inc.

Message 51 of 62
nikhunter
in reply to: Ktelang

Mike i find the problem....

In any Key, at "A" for example, there are some default Scortcuts....So when i press "A", i  have 2 choises.First is the Analyze Interference and second is my option...I can choose any of 2 and pressing enter to activate.If at some key, there is not an default schortcut, when i pressing i have instantly the desired result...

So, you fixed my problem...

I realy thank you.I dont have words.....After the solution of this problem, i finish my graduate work.

Really THANK you man....

Message 52 of 62
JorisSteurs1246
in reply to: Ktelang

I tried to use the VBcode, but my Ilogic rules are external and the VBcode can't find the Ilogic rule. Is this code easy to modify so that it is also usable with extrnal Ilogic? Im using AI 2013.

Tags (2)
Message 53 of 62
MjDeck
in reply to: nikhunter

The code that I posted before will run an external rule. It's attached again here.
iLogic will find external rule files in the directory of the current document and in the workspace directory. You can add other directories to search using  Tools > Options > iLogic Configuration

ExternalRuleDirectories.png

 


Mike Deck
Software Developer
Autodesk, Inc.

Message 54 of 62
JorisSteurs1246
in reply to: MjDeck

This code works perfect 🙂   Thanks so much . I don't really have programming skills, but I think the code to launch a global form could be easely  added to the same script?  Now have to launch this form from the ilogic browser for every part I make so there is a big timesaver in it for me.

Thanks again.

Joris

Message 55 of 62
transpacbe
in reply to: MjDeck

Hi Mike,

 

What would one need to modify in this VB code to call up an external rule?

 

Thanks,

Ben

Inventor 2016 R2

Message 56 of 62
transpacbe
in reply to: transpacbe

To be clear, the attached code is the one I was referring to (the first one you posted.)

This works great to call up a rule calling up a form in my local doc, but not for global rule.

 

Thanks,

 

Ben

Message 57 of 62
MjDeck
in reply to: transpacbe

Hi Ben,
 
 Please look at post 53 in this thread. You should be able to use the file RunExternalRule-ivb.txt that is attached to post 53. Edit it and substitute the name of your external rule. The rule file must be in a directory that you have added to the list of External Rule Directories in the iLogic Configuration dialog.


Mike Deck
Software Developer
Autodesk, Inc.

Message 58 of 62
fsdolphin
in reply to: MjDeck

 

Deleted... Duplicate question

 

 

Message 59 of 62
Thiruchandru
in reply to: Ktelang

Capture.PNGCapture0.PNG

 

This VBA was working but, finally get some error report,

 

please solve this issue , i have tried to run external rule    

Message 60 of 62
alexanderboogaard
in reply to: Ktelang

I can confirm that this solution still works for external rules in Inventor 2022.

See below a summary of all edits to follow:

  • Start the VBA Editor:

alexanderboogaard_0-1692171115177.png

  • Rightclick on ApplicationProject >insert >> module.
  • Paste the code attached to post 53 and change the name in line 3 to the rule you want to shortcut:

alexanderboogaard_1-1692171571428.png

  • Make sure to hit the 'Save' button. Then close the editor.

alexanderboogaard_4-1692172118810.png

 

 

  • Now assign a shortcut to the macro:

alexanderboogaard_2-1692171718411.pngalexanderboogaard_3-1692171781467.png

 

That's all.

You can now use the shortcut you created to run the ilogicrule you provided.


Kind regards,
Alexander Boogaard

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report