Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Error message from ilogic

Anonymous

Error message from ilogic

Anonymous
Not applicable

Hi everyone,

 

I am making a drawing of an iForm part and am trying to get inventor to automatically make some of the dimensions. I follow this tutorial:

 

https://www.youtube.com/watch?v=bcOvYc6rNUk

 

However, when I insert the code marked in red below, I this error:

 

Error in rule:

 

Unable to cast COM object of type 'System.__ComObject' to interface type 'Inventor.AssemblyDocument'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{29F0D465-C114-11D2-B77F-0060B0F159EF}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

 

I have no clue why I get this error message.

 

 

Code:

'---INITIAL SETUP---

'References this document
Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisDoc.Document

'References this drawing sheet
Dim oSheet As Sheet
oSheet = oDrawDoc.ActiveSheet

 

'References this drawing view
Dim oView As DrawingView
oView = ActiveSheet.View("1").View

'References this drawing view model
Dim oAssyDoc As AssemblyDocument
oAssyDoc = ActiveSheet.View("1").ModelDocument

'Readies code for creation of reference points for dimension placement
Dim oTG As TransientGeometry
oTG = ThisApplication.TransientGeometry

'Readies code for creation of general dimensions
Dim oGeneralDims As GeneralDimensions
oGeneralDims = oSheet.DrawingDimensions.GeneralDimensions

0 Likes
Reply
Accepted solutions (1)
1,216 Views
4 Replies
Replies (4)

Anonymous
Not applicable
Accepted solution

Found the solution

0 Likes

Anonymous
Not applicable

Hi @Anonymous 

Would you please share the details of the solution, I have the same issue.

Thanks

Sandy3EG8M
Participant
Participant

I'm having the same issue. Is there a solution?

0 Likes

Sandy3EG8M
Participant
Participant

Ah

I was in a part not an assembly.

Wasn't thinking!

0 Likes