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

Accessing Preparation Items in Drawing View - Model State, iLogic code (API)

ReneRepina
Collaborator

Accessing Preparation Items in Drawing View - Model State, iLogic code (API)

ReneRepina
Collaborator
Collaborator

Hello,

 

is there any possibility to access Preparation Items inside Drawing View - Model State dialog with iLogic code (API)?

 

ReneRepina_0-1590181678366.png

 

I also saw few thread regarding accessing the "Model State" inside "Drawing View" is not possible. Is there any new news (or implementation) on that?

 

 

Best regards,

Rene Repina

0 Likes
Reply
Accepted solutions (1)
1,304 Views
5 Replies
Replies (5)

YuhanZhang
Autodesk
Autodesk
Accepted solution

The DrawingView.SetWeldmentState allows you to set the weldment state circled in the picture. Please refer to the documentation for more details:

 

http://help.autodesk.com/view/INVNTOR/2020/ENU/?guid=GUID-EEF8071C-6ABA-42E1-A7D1-72B18B0D8756



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

ReneRepina
Collaborator
Collaborator

@YuhanZhang Thank you for your help! This is what I needed.

0 Likes

freesbee
Collaborator
Collaborator

Dear Rocky @YuhanZhang ,

doing some additional research on this topic I have landed at this video from @Anonymous.sekar.g which makes me think that the following code:

 

 

Sub TEST()
Dim oDrawDoc as DrawingDocument
Set oDrawDoc = ThisApplication.ActiveDocument
Dim oSheet as Sheet

Dim oWeldState As WeldmentStateEnum
Dim oWeldObject As Object
Dim oDrawView As DrawingView
For Each oSheet In oDrawDoc.Sheets
  For Each oDrawView In oSheet.DrawingViews
    If oDrawView.ViewType = kStandardDrawingViewType Then
      Call oDrawView.GetWeldmentState(oWeldState, oWeldObject)
    End If
  Next
Next
end sub

 

 

fails on the method GetWeldmentState (as it is in happening in my specific case as well).

So I imagine that sometimes in the past you have addressed the INVGEN-17324 issue.

Would you be so kind to share on which release/update this issue has been addressed, or eventually share the right syntax to use this method?

Massimo Frison
CAD R&D // PDM Admin · Hekuma GmbH
0 Likes

freesbee
Collaborator
Collaborator

...oh... I just discovered that INVGEN-17324 has been fixed on 2020  :downcast_face_with_sweat:

Massimo Frison
CAD R&D // PDM Admin · Hekuma GmbH
0 Likes

YuhanZhang
Autodesk
Autodesk

You're right, it was fixed for Inventor 2020.



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

0 Likes