Kent, he would still need to have the code to call the add-in in his
document project (if I understand Brian's example, I haven't downloaded it
yet).
If he puts this in bit of code in each and every part, sooner or later it's
going to blow up in any decent sized assy. I've been doing some more
reading on VBA's memory handling and it's not the best in the world...
--
Sean Dotson, PE
http://www.sdotson.com
Check the Inventor FAQ for most common questions
www.sdotson.com/faq.html
-----------------------------------------------------------------------
"Kent Keller" wrote in message
news:D8892C8C4E2D3CBF6ED97E7687971B8B@in.WebX.maYIadrTaRb...
> No you can't, it takes full blown VB, but Brians solution should work for
you I would
> think. It is a Addin
>
> --
> Kent
> Assistant Moderator
> Autodesk Discussion Forum Moderator Program
>
>
> "RuiF" wrote in message
> news:2C21C45E6DBF787879580993851FC7FD@in.WebX.maYIadrTaRb...
> > Not that I'm 100% sure of what an addin is exactly, but I'm almost sure
you can't do it
> with VBA can you?
> >
> > Rui
> > "Sean Dotson" wrote in message
> news:EA60C71EEF80B6865DBDDFA5F69C9B82@in.WebX.maYIadrTaRb...
> > I wouldn't even recommend that.
> >
> > I had a few hundred parts with nothing but a small sub (3-4 lines) and
it kept
> crashing VBA. Inventor was fine but the VBA environment couldn't handle
it.
> >
> > I'd look at making it an add-in. (which is what I ended up doing with
my document
> code)
> >
> >
> > --
> > Sean Dotson, PE
> > http://www.sdotson.com
> > Check the Inventor FAQ for most common questions
> > www.sdotson.com/faq.html
>
-----------------------------------------------------------------------
> > "RuiF" wrote in message
> news:14D83A200187C47B4409DB1B0215BDA9@in.WebX.maYIadrTaRb...
> > Those are some of the reasons why I wanted to keep this as an
application macro.
> >
> > Is there any way for a document macro to call an application program
to run?
> >
> > At least then the document would contain very little code.
> >
> > Like I said, ideally, I would have an application macro that ran
every time a
> feature in a part was commited, but so far nobody has been able to help me
(added to the
> fact that I'm relatively new to IV and VBA, the scenario doesn't get
better).
> >
> > I've been looking at transactions, although I'm not sure if that's
what I want.
> >
> > Thanks in advance for any input you guys may have.
> >
> > Rui
> >
> >
> > "Kent Keller" wrote in message
> news:1355BB64A8DC1A7456AF32A38757749B@in.WebX.maYIadrTaRb...
> > Ruif
> >
> > You may want to read the Subject VBA creation started on the 18th
of this month.
> Using
> > the Auto macros in your templates is not suggested. Also read
the subject "A
> limit to
> > the # of VBA project loaded at one time?" thread started on the
16th
> >
> > --
> > Kent
> > Assistant Moderator
> > Autodesk Discussion Forum Moderator Program
> >
> >
> > "RuiF" wrote in message
> > news:D2BA59B40BDB3BD6C3A7063FBBAF1B30@in.WebX.maYIadrTaRb...
> > > Excellent!! Thanks
> > >
> > > Now for making my program better:
> > >
> > > 1. Can I add this to a template file so it's available to all
parts?
> > >
> > > 2. Can something similar be done so the program runs when I
commit a feature?
> > >
> > > Thanks for the help so far.
> > >
> > > Rui
> > >
> > > "Xavier Collet" wrote in message
> > news:8244FAFC61BED280D94AFFCBF2D04838@in.WebX.maYIadrTaRb...
> > > Yes, you should use the AutoSave:
> > >
> > > This code should be add into the "Autodesk Inventor
Objects\ThisDocument"
> section.
> > >
> > >
> > > Public Sub AutoSave_DoNothing()
> > > MsgBox "This macro do... nothing"
> > > End Sub
> > >
> > > The message will be prompt each time you save the file
(replace the "DoNothig"
> with
> > your function name).
> > >
> > > Xavier
> > > "RuF" a écrit dans le message de
> > news:149D88C0BC9E882FB314B8249580AA23@in.WebX.maYIadrTaRb...
> > > Hi all
> > >
> > > I'm still looking for a solution, and I'm sure it's there.
> > >
> > > Is there any method of running a macro automatically when I
save a file?
> > >
> > > Thanks
> > >
> > > Rui
> > >
> > >
> >
> >
>
>