How to use ThisApplication in Inventor

How to use ThisApplication in Inventor

Anonymous
Not applicable
830 Views
4 Replies
Message 1 of 5

How to use ThisApplication in Inventor

Anonymous
Not applicable

I think that is very popular question, but I have still have not found clear answer.

I have watch video about how to use ThisApplication in AutoCad.

Is it exist also so simple possibility in inventor?

0 Likes
831 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable

I mean offcourse VB.net

How to use ThisApplication in VB.net?

0 Likes
Message 3 of 5

Anonymous
Not applicable

I have understand how to do in AddIn. Here is part of code: Implements Inventor.ApplicationAddInServer Public Sub Activate(ByVal addInSiteObject As Inventor.ApplicationAddInSite, ByVal firstTime As Boolean) Implements Inventor.ApplicationAddInServer.Activate MsgBox("dll was started!") m_inventorApplication = addInSiteObject.Application appevents = m_inventorApplication.ApplicationEvents End Sub But if I want to create a dll that will be placed in: C:\Program Files\Autodesk\Inventor 2011\Bin\iLogicBin And later called like: AddReference "myvbdll" Is it possible to use ThisApplication in that dll?

0 Likes
Message 4 of 5

MjDeck
Autodesk
Autodesk

Yes, you can use ThisApplication in a dll that will be referenced in an iLogic rule.

 

(Note that you you should put the dll in

C:\Program Files\Autodesk\Inventor 2011\Bin\iLogicAdd

instead of iLogicBin.)

 

To use ThisApplication in a dll:

- Add a reference to Autodesk.Inventor.Interop  to your VB.NET project.

- Add the line:

Imports Inventor

to your VB.NET source file

 

- Add a member to your VB.NET class:

Public ThisApplication as Inventor.Application

 

- In your rule, connect the predefined object named ThisApplication to that member variable:

Dim myClass As New MyVbClass()

myClass.ThisApplication = ThisApplication

 

 

 


Mike Deck
Software Developer
Autodesk, Inc.

0 Likes
Message 5 of 5

Anonymous
Not applicable

"

- In your rule, connect the predefined object named ThisApplication to that member variable:

Dim myClass As New MyVbClass()

myClass.ThisApplication = ThisApplication

"

 

Thank you - I have don't know about this part.

0 Likes