Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
ReneRepina
1250 Views, 5 Replies

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

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

Labels (7)
5 REPLIES 5
Message 2 of 6
YuhanZhang
in reply to: ReneRepina

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.

Message 3 of 6
ReneRepina
in reply to: YuhanZhang

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

Message 4 of 6
freesbee
in reply to: YuhanZhang

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
Message 5 of 6
freesbee
in reply to: freesbee

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

Massimo Frison
CAD R&D // PDM Admin · Hekuma GmbH
Message 6 of 6
YuhanZhang
in reply to: freesbee

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.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report