Getoject("inventor.application") creates a new inventor session

Getoject("inventor.application") creates a new inventor session

bradeneuropeArthur
Mentor Mentor
226 Views
3 Replies
Message 1 of 4

Getoject("inventor.application") creates a new inventor session

bradeneuropeArthur
Mentor
Mentor
  • Why is it the case that in ilogic Getoject("inventor.application") creates a new inventor session?

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
227 Views
3 Replies
Replies (3)
Message 2 of 4

WCrihfield
Mentor
Mentor

Hi @bradeneuropeArthur.  I am not sure why that might be happening.  When using GetObject method, did you provide an empty String as the first input, then "Inventor.Application" as the second input?  If not, that may be why it is doing that.  I just tested the following code in an iLogic rule, and it worked just fine for me using Inventor Pro 2024.0.1 version.

Dim InvApp As Inventor.Application = Nothing
Try
	InvApp = GetObject("", "Inventor.Application")
	Logger.Info("Running Instance Of Inventor Application Found")
Catch
	InvApp = CreateObject("Inventor.Application")
	Logger.Info("Created Instance Of Inventor Application")
End Try
If InvApp Is Nothing Then
	Logger.Debug("Inventor Application Not Found")
Else
	Logger.Debug("Inventor Application Found")
End If

 

INFO| 2: >>---------------------------
INFO|Running Instance Of Inventor Application Found
DEBUG|Inventor Application Found

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 4

bradeneuropeArthur
Mentor
Mentor

Than this is a bug.

Please @johnsonshiue could you and your team take a look at this.

 

 

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 4 of 4

rossano_praderi
Collaborator
Collaborator

The code sample posted by @WCrihfield as to work because is the right implementation, but you didn't post your code.

 

Maybe your code is buggy, would you like to show your code to us?



--------------------------------------
If my post answers your question, please click the "Accept as Solution"
button. This helps everyone find answers more quickly!
---------------
0 Likes