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: 

Create "pop-up" message when file is opened?

12 REPLIES 12
Reply
Message 1 of 13
clo-z-nuff
823 Views, 12 Replies

Create "pop-up" message when file is opened?

Is there any way to create a message that pops up when an idw, ipt or iam file is opened? I would like whomever is opening the file to be aware of some things upon opening the file. I am aware of the engineer notes but I'm afraid this will be overlooked. We are using R10.

Thanks,

Kevin
12 REPLIES 12
Message 2 of 13
Anonymous
in reply to: clo-z-nuff

Yes. It requires a little vba work but it is not hard.

Open your part.
From the tools menu select Macro -> Visual Basic Editor
Once the editor appears you should look in the upper left at the
"Project-Document Project" pane and find the documentProject for the
file you opened and want to put the message in.
Expand it until you see Modules folder and then select the Functions module
Paste the following

Public Sub autoedit()

MsgBox "Hello World"

End Sub

There are three functions you can use

"autoopen" - this happens every time you open a doc.
"autoedit" - this happens whenever the document is edited open.
"autosave" - this happens whenever the document is saved.

In general I don't recommend users put a lot of VBA code into every
file, but if all you are looking to do is show a warning, then you
should be OK.

Also remember that this dialog will always come up on the event you tell
it to.

-Kevin Schneider
Message 3 of 13
MariaManuela
in reply to: clo-z-nuff

Hi..
What kind of notes? You said "engineer notes"...The Engineer Notebook functionality its created to assign notes to any IPT or IAM, but doesn't have that feature that you ask (pops up when an idw, ipt or iam file is opened). If you want add any description you could use Autodesk Vault, its not specific to do what you want, but its the only way (that i know) to assign notes to any file of your design project, including IDW files.
Asidek Consultant Specialist
www.asidek.es
Message 4 of 13
clo-z-nuff
in reply to: clo-z-nuff

Kevin,

This works peeerrrrffffeeeccctttt!!! Thanks!
Message 5 of 13
mcgyvr
in reply to: clo-z-nuff

I feel like such a geek, I just used the routine above and it worked..(Im using it to alert myself and others of obsolete parts and their replacement).. My first time using VBeditor. Now Im hooked,...
time to buy "VB for Dummies" book


-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269
Message 6 of 13
Anonymous
in reply to: clo-z-nuff

geek out on this one.... uses the same principals. I have this in my
template folder and then, every time i need a spring. it is done.
Although these days i use design accelerators most of the time 🙂

-Kevin Schneider
Message 7 of 13
mcgyvr
in reply to: clo-z-nuff

Kevin,
That one is cool (in a geeky way) too.
Ive got to learn this vb stuff.
Its neat.
I could find tons of uses for that.


-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269
Message 8 of 13
VeronicaSmith5891
in reply to: Anonymous

I'm trying to do the exact same thing but I'm using Inventor Professional 2014 so following these instructions aren't working for me since its been so many years. Or maybe I'm just doing it wrong.  When I go to Tools both Macro and VBA Editor are there.  Not Macro then VBA Editor under it.  So I'm not sure the order.  I can create the macro and run it and my message box pops up only when I tell it to run but I can't get it to pop-up automatically when I open the .ipt file.  I'm very unfamiliar with macros and VBA.  

 

Thanks!

V

Message 9 of 13


@VeronicaSmith5891 wrote:

I'm trying to do the exact same thing but I'm using Inventor Professional 2014 so following these instructions aren't working for me since its been so many years. Or maybe I'm just doing it wrong.  When I go to Tools both Macro and VBA Editor are there.  Not Macro then VBA Editor under it.  So I'm not sure the order.  I can create the macro and run it and my message box pops up only when I tell it to run but I can't get it to pop-up automatically when I open the .ipt file.  I'm very unfamiliar with macros and VBA.  

 

Thanks!

V


http://modthemachine.typepad.com/my_weblog/2013/07/add-in-with-event-example-to-replace-auto-run-mac...

Message 10 of 13

After trying various things I found it was easier to make an iLogic rule and it works perfect!

Message 11 of 13
v.ibanescu
in reply to: clo-z-nuff

Hi Guys,

 

i want to implemet something like this in Invetor 2022. I need when I create a new IDW  to have a fenster that will pop up and say something like:  " Please create this drawing accordin to the protocoll" . I didn't find out until know how to do this with Inventor 2022, maybe you can help me?

 

Thanks,

Victor 

Message 12 of 13
mcgyvr
in reply to: v.ibanescu


@v.ibanescu wrote:

Hi Guys,

 

i want to implemet something like this in Invetor 2022. I need when I create a new IDW  to have a fenster that will pop up and say something like:  " Please create this drawing accordin to the protocoll" . I didn't find out until know how to do this with Inventor 2022, maybe you can help me?

 

Thanks,

Victor 


@v.ibanescu.. You can easily do this with ilogic now. 

1-In your drawing click on the + next to the "model" tab of the model browser and select "ilogic" to open that browser..

mcgyvr_0-1658145948178.png

2-On the "Rules" tab of the ilogic browser right click in the open area below and select "Add Rule" and give your rule a name.

mcgyvr_1-1658146021913.png

3- Paste the following into the right hand section.

MessageBox.Show("Please create this drawing according to the protocol.", "Protocol Alert")

4-Select "Save and Run" to save it and see what will happen.

5-Go to the "Manage" ribbon and in the "iLogic" section press the "Event Triggers" button.

mcgyvr_2-1658146169800.png

 

6-Switch to the "Drawings" tab of that dialog box and drag your rule from the left hand column right below the "After Open Document" event and press OK.

7-Now anytime you open a drawing your rule should run automatically and show that message.

 



-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269
Message 13 of 13
v.ibanescu
in reply to: v.ibanescu

wow! Cool! Thank you! @mcgyvr 😀

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

Post to forums  

Autodesk Design & Make Report