Why VBA editor, icon to fire a macro and all custom commands in ribbon related to macros are grayed out when iPart member is open?

Why VBA editor, icon to fire a macro and all custom commands in ribbon related to macros are grayed out when iPart member is open?

tomasz.sztejka
Advocate Advocate
328 Views
2 Replies
Message 1 of 3

Why VBA editor, icon to fire a macro and all custom commands in ribbon related to macros are grayed out when iPart member is open?

tomasz.sztejka
Advocate
Advocate

Hi,

 

 I was trying to make my work easier and created some macros which do some queries about part, open some related files and etc. It worked fine, so I added it as a custom command to a ribbon.

 

Unfortunately it is useless because all macro related icons are grayed out when iPART MEMBER is opened.

 

Disabled_macros.png

 

Questions:

1.What is a rationale behind DISABLING macros editor, ability to run macros and user custom icons?

2.How to set up Inventor to be able to QUICKLY (one click or something) start a macro FROM iPART MEMBER?

 

Current work around is:

1.Open empty, regular part.

2.Start VBA Editor.

3.Keep it open.

4.Open iPart member.

5.Select proper macro module in VBA editor, Click [>] icon to start macro.

6.Observe how it runs.

 

Pain in a behind, far from improving productivity.

 

Software version: Autodesk Inventor Pro 2021 build 353, Release 2021.3.2

 

0 Likes
329 Views
2 Replies
Replies (2)
Message 2 of 3

WCrihfield
Mentor
Mentor

Is the iPart Member a standalone file, saved either on the local hard drive or network drive, but not within a Content Center or other library type location?  Do you see a 'DocumentProject' listed for that specific iPart Member document, within the Project Explorer window of your VBA Editor dialog when it is open?  If so, does that DocumentProject show the file's path &/or name within the (), after that "DocumentProject"?

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 3

tomasz.sztejka
Advocate
Advocate

This is a stand alone project.

 

Everything is on the local drive.

 

All files are having read-only attribute cleared.

 

>(...) Do you see a 'DocumentProject' listed for that specific iPart Member document, within the Project Explorer window of your VBA Editor dialog when it is open(...)

 

Yes. But an icon to open VBA editor is GRAYED OUT when I open iPart member, so to check it I need to open an another part.

 

All macros I would like to start are in Default.ivb, so this is not the issue with VBA not seeing iPart.

 

Notice, I also cannot access properties for iPart member (no menu in content menu), I can't toggle visibility when I open iAssembly member (options grayed out), cannot do any cross section in Analyze and etc.

 

From what I can see in this Inventor version any option which has a slightest chance to edit solid or assembly is disable if You open the iPart/iAssembly member. This is consistent with the fact, that iPart member is considered to be fully automatically generated, so this is natural to avoid users confusion.

 

The problem is, that when I put iPart factory on a drawing I need to select a member. Selecting "active member" is asking for troubles, because "active member" is continuously toggled when I either inspect or work on iPart factory. But when I select a specific member the drawing tree is showing the member file instead of factory file and any "open", double click and etc are causing iPart member to be opened.

 

I can't see any option, which is for an example available for derived parts, to quickly open factory file from iPart member file. Since names of member files are fully user configurable, it may be an unacceptable guess work to find which factory file actually controls this member. Especially if it is not I who made a project in a first place.

 

To overcome this issue I did create a macro to jump to factory file and then... tadam! It is grayed out.

 

I would be glad to know what was rationale behind it and what type of work flow is proposed by Autodesk to move as fast as possible from drawing with iPart/iAssembly factory inserted with a member selected to a part factory file which can be inspected, have visibility toggled to see what is inside in this member and so on.

 

0 Likes