Disable AddIn if run as Apprentice

Disable AddIn if run as Apprentice

Anonymous
Not applicable
485 Views
7 Replies
Message 1 of 8

Disable AddIn if run as Apprentice

Anonymous
Not applicable
How can I determine if Inventor is running as apprentice server?
I want to disable my AddIn for apprentice.

Ronny
0 Likes
486 Views
7 Replies
Replies (7)
Message 2 of 8

Anonymous
Not applicable

Add-Ins are supported by Apprentice so you don't
need to worry about this case.
--
Brian Ekins
Autodesk Inventor
API

href="http://blogs.autodesk.com/modthemachine">http://blogs.autodesk.com/modthemachine
0 Likes
Message 3 of 8

Anonymous
Not applicable

Oops.  I meant Add-Ins are _NOT_ supported by
Apprentice.


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">


Add-Ins are supported by Apprentice so you don't
need to worry about this case.
--
Brian Ekins
Autodesk Inventor
API

href="http://blogs.autodesk.com/modthemachine">http://blogs.autodesk.com/modthemachine
0 Likes
Message 4 of 8

Anonymous
Not applicable
Well, maybe they are not supported, but the AddIns are loaded, and they have caused trouble for Task Scheduler.
Yesterday I solved a mystery by disabling an addin.
The Migrate task in TS stopped on every file and asked if he (a customer) wanted to migrate the files.
This was because an addin was loaded, the AddIn was Dotsons (old) AutoDWF.
I also noticed that one of mine was loaded on my PC when I tried to recreate the problem, my AddIn did not cause Inventor to stop, but it has a system tray icon. At the end of the task I had like 20 of these icons :-). If I had run the task on 24000 files (this customer was about to run TS on this many files) I don't know what would have happened...

Ronny Edited by: ronny.rusten@nestor.no on Oct 15, 2008 9:00 AM
0 Likes
Message 5 of 8

Anonymous
Not applicable

I think you're getting Apprentice confused with
running Inventor invisibly.  Apprentice doesn't have the ability to load an
add-in.  Even if it tried to load an add-in, the API calls that a typical
add-in would try to make would fail because of the limited API that Apprentice
supports.  One way for you to verify what's running is when
you're in a state where you think Apprentice is running is to use Task Manager
and see what's actually running.  If it's Apprentice you'll only see
your application running.  If it's Inventor, you'll see Inventor.exe
running.  Inventor can be running and not visible.  That's
typical of many batch processing applications, which is likely what Sean's
application is.
--
Brian Ekins
Autodesk Inventor API

href="http://blogs.autodesk.com/modthemachine">http://blogs.autodesk.com/modthemachine
0 Likes
Message 6 of 8

Anonymous
Not applicable
Sean's application is not a batch processing application, but I understand what you are saying...I think...
What you are saying is that Inventor's Task Sceduler is running Inventor in a hidden state, it is not using apprentice...
I can test if Inventor is running hidden an if true I can disable my AddIn.

Right??

Btw. What will show in task manager if apprentice is running?

Ronny
0 Likes
Message 7 of 8

Anonymous
Not applicable

To see if Inventor is visible or not just check the
value of the Application.Visible property.  This is a read-write
property.  Setting it to True will make Inventor visible.  When you're
add-in starts I suspect this will always be False because Inventor isn't fully
loaded yet and isn't visible.  I didn't test that though so maybe it will
indicate what the state will be once it's completely up.

 

If an application is using Apprentice you won't see
anything in Task Manager that would indicate that.  The only thing there
will be the application.  Apprentice is a compoent and runs within the
process that's using it.  There are other tools you can use to look at any
libraries that a running application is using.  These would show that the
application has loaded the Apprentice dll plus a bunch of other dll's that
apprentice is dependent on.
--
Brian Ekins
Autodesk Inventor API

href="http://blogs.autodesk.com/modthemachine">http://blogs.autodesk.com/modthemachine
0 Likes
Message 8 of 8

Anonymous
Not applicable
I wanto get some properties using aprentice from an inventor add-in by click of button.

but am not able to get the result


if am doing the same from a stand alone application (Normal .net application, not add-in) its working fine. can any one help me on this??



thanks in advance.

Regards
shyam
0 Likes