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: 

Macro question

6 REPLIES 6
Reply
Message 1 of 7
Anonymous
166 Views, 6 Replies

Macro question

I created a macro (thanks to Sean and other from my 12/9/03 post) and made
an icon for it. The funny thing is when I click on the icon the first time
(in a new session of IV) it doesn't do anything, and then if I click it
again it runs the macro. It continues to work fine until I restart IV and
then again the first click on the icon does nothing.
Its a minor problem but would like to understand why its doing it.
Thanks,
Vadim
6 REPLIES 6
Message 2 of 7
Anonymous
in reply to: Anonymous

If you choose it from the MACROS menu does it run the 1st time?

--
______________
Rui
ruivaz@cadmais.pt
www.cadmais.pt


"Vadim" wrote in message
news:F87F0258AE1E0A6206411BD86DC8A943@in.WebX.maYIadrTaRb...
> I created a macro (thanks to Sean and other from my 12/9/03 post) and made
> an icon for it. The funny thing is when I click on the icon the first
time
> (in a new session of IV) it doesn't do anything, and then if I click it
> again it runs the macro. It continues to work fine until I restart IV and
> then again the first click on the icon does nothing.
> Its a minor problem but would like to understand why its doing it.
> Thanks,
> Vadim
>
>
Message 3 of 7
Anonymous
in reply to: Anonymous

Yes but I must first change "Macros in:" field from "document project" to
"all application projects and active documents".

"Rui" wrote in message
news:7F6B523ABBFA982E960B5840CA6AA6B7@in.WebX.maYIadrTaRb...
> If you choose it from the MACROS menu does it run the 1st time?
>
> --
> ______________
> Rui
> ruivaz@cadmais.pt
> www.cadmais.pt
>
>
> "Vadim" wrote in message
> news:F87F0258AE1E0A6206411BD86DC8A943@in.WebX.maYIadrTaRb...
> > I created a macro (thanks to Sean and other from my 12/9/03 post) and
made
> > an icon for it. The funny thing is when I click on the icon the first
> time
> > (in a new session of IV) it doesn't do anything, and then if I click it
> > again it runs the macro. It continues to work fine until I restart IV
and
> > then again the first click on the icon does nothing.
> > Its a minor problem but would like to understand why its doing it.
> > Thanks,
> > Vadim
> >
> >
>
>
Message 4 of 7
Anonymous
in reply to: Anonymous

Going from foggy memory, but in the past I have run into issues when trying to access the
VBA environment programmatically. It seems like the environment wasn't initialized until
the first time the user accessed it through the menu. I don't really remember if and how
we got around it. Maybe Charles does?
--
Kent
Assistant Moderator
Autodesk Discussion Forum Moderator Program


"Vadim" wrote in message
news:F87F0258AE1E0A6206411BD86DC8A943@in.WebX.maYIadrTaRb...
> I created a macro (thanks to Sean and other from my 12/9/03 post) and made
> an icon for it. The funny thing is when I click on the icon the first time
> (in a new session of IV) it doesn't do anything, and then if I click it
> again it runs the macro. It continues to work fine until I restart IV and
> then again the first click on the icon does nothing.
> Its a minor problem but would like to understand why its doing it.
> Thanks,
> Vadim
>
>
Message 5 of 7
Anonymous
in reply to: Anonymous

Have you run it in break mode from the icon to see what is going on?

Maybe some variable initiation isn't firing up well (but that wouldn't
explain why it ran from the MACROS menu.....)

I'm at a loss. Maybe if you post to the Customizatio NG...

--
______________
Rui
ruivaz@cadmais.pt
www.cadmais.pt


"Vadim" wrote in message
news:9684BA3BF5835A27DF7FB1FCB40970C9@in.WebX.maYIadrTaRb...
> Yes but I must first change "Macros in:" field from "document project" to
> "all application projects and active documents".
>
> "Rui" wrote in message
> news:7F6B523ABBFA982E960B5840CA6AA6B7@in.WebX.maYIadrTaRb...
> > If you choose it from the MACROS menu does it run the 1st time?
> >
> > --
> > ______________
> > Rui
> > ruivaz@cadmais.pt
> > www.cadmais.pt
> >
> >
> > "Vadim" wrote in message
> > news:F87F0258AE1E0A6206411BD86DC8A943@in.WebX.maYIadrTaRb...
> > > I created a macro (thanks to Sean and other from my 12/9/03 post) and
> made
> > > an icon for it. The funny thing is when I click on the icon the first
> > time
> > > (in a new session of IV) it doesn't do anything, and then if I click
it
> > > again it runs the macro. It continues to work fine until I restart IV
> and
> > > then again the first click on the icon does nothing.
> > > Its a minor problem but would like to understand why its doing it.
> > > Thanks,
> > > Vadim
> > >
> > >
> >
> >
>
>
Message 6 of 7
Anonymous
in reply to: Anonymous

Thanks,
I posted the default ivb to the CF

"Rui" wrote in message
news:66111A71FFABCF9824A5E982FE92E03B@in.WebX.maYIadrTaRb...
> Have you run it in break mode from the icon to see what is going on?
>
> Maybe some variable initiation isn't firing up well (but that wouldn't
> explain why it ran from the MACROS menu.....)
>
> I'm at a loss. Maybe if you post to the Customizatio NG...
>
> --
> ______________
> Rui
> ruivaz@cadmais.pt
> www.cadmais.pt
>
>
> "Vadim" wrote in message
> news:9684BA3BF5835A27DF7FB1FCB40970C9@in.WebX.maYIadrTaRb...
> > Yes but I must first change "Macros in:" field from "document project"
to
> > "all application projects and active documents".
> >
> > "Rui" wrote in message
> > news:7F6B523ABBFA982E960B5840CA6AA6B7@in.WebX.maYIadrTaRb...
> > > If you choose it from the MACROS menu does it run the 1st time?
> > >
> > > --
> > > ______________
> > > Rui
> > > ruivaz@cadmais.pt
> > > www.cadmais.pt
> > >
> > >
> > > "Vadim" wrote in message
> > > news:F87F0258AE1E0A6206411BD86DC8A943@in.WebX.maYIadrTaRb...
> > > > I created a macro (thanks to Sean and other from my 12/9/03 post)
and
> > made
> > > > an icon for it. The funny thing is when I click on the icon the
first
> > > time
> > > > (in a new session of IV) it doesn't do anything, and then if I click
> it
> > > > again it runs the macro. It continues to work fine until I restart
IV
> > and
> > > > then again the first click on the icon does nothing.
> > > > Its a minor problem but would like to understand why its doing it.
> > > > Thanks,
> > > > Vadim
> > > >
> > > >
> > >
> > >
> >
> >
>
>
Message 7 of 7
Anonymous
in reply to: Anonymous

Try this. This seams to make more sense (at least to me...hehe)

SendKeys "%t", False
SendKeys "o", False
SendKeys "{RIGHT 3}", False
SendKeys "{TAB 11}", False
SendKeys " ", False
SendKeys "{TAB 1}", False
SendKeys " ", False
SendKeys "{ENTER}", True


--
______________
Rui
ruivaz@cadmais.pt
www.cadmais.pt


"Vadim" wrote in message
news:1F43FF5E79BE287F039A33DE5917B01B@in.WebX.maYIadrTaRb...
> Thanks,
> I posted the default ivb to the CF
>
> "Rui" wrote in message
> news:66111A71FFABCF9824A5E982FE92E03B@in.WebX.maYIadrTaRb...
> > Have you run it in break mode from the icon to see what is going on?
> >
> > Maybe some variable initiation isn't firing up well (but that wouldn't
> > explain why it ran from the MACROS menu.....)
> >
> > I'm at a loss. Maybe if you post to the Customizatio NG...
> >
> > --
> > ______________
> > Rui
> > ruivaz@cadmais.pt
> > www.cadmais.pt
> >
> >
> > "Vadim" wrote in message
> > news:9684BA3BF5835A27DF7FB1FCB40970C9@in.WebX.maYIadrTaRb...
> > > Yes but I must first change "Macros in:" field from "document project"
> to
> > > "all application projects and active documents".
> > >
> > > "Rui" wrote in message
> > > news:7F6B523ABBFA982E960B5840CA6AA6B7@in.WebX.maYIadrTaRb...
> > > > If you choose it from the MACROS menu does it run the 1st time?
> > > >
> > > > --
> > > > ______________
> > > > Rui
> > > > ruivaz@cadmais.pt
> > > > www.cadmais.pt
> > > >
> > > >
> > > > "Vadim" wrote in message
> > > > news:F87F0258AE1E0A6206411BD86DC8A943@in.WebX.maYIadrTaRb...
> > > > > I created a macro (thanks to Sean and other from my 12/9/03 post)
> and
> > > made
> > > > > an icon for it. The funny thing is when I click on the icon the
> first
> > > > time
> > > > > (in a new session of IV) it doesn't do anything, and then if I
click
> > it
> > > > > again it runs the macro. It continues to work fine until I
restart
> IV
> > > and
> > > > > then again the first click on the icon does nothing.
> > > > > Its a minor problem but would like to understand why its doing it.
> > > > > Thanks,
> > > > > Vadim
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>

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

Post to forums  

Autodesk Design & Make Report