API for Shared Views?

API for Shared Views?

el_jefe_de_steak
Collaborator Collaborator
708 Views
4 Replies
Message 1 of 5

API for Shared Views?

el_jefe_de_steak
Collaborator
Collaborator

Hi, I'm wondering if anyone can tell me if there is an API for the "Shared Views" feature of Inventor? I'd like to use it to autonomously generate shared views and send the viewer link via email.

0 Likes
Accepted solutions (1)
709 Views
4 Replies
Replies (4)
Message 3 of 5

el_jefe_de_steak
Collaborator
Collaborator

@Gabriel_Watson thank you! It's too bad that this feature is missing.

Message 4 of 5

ejaL9K8H
Advocate
Advocate

Hi I succeed making a code, which i able to generate the shared view:

Imports System.Windows.Forms
Sub Main()
        
Dim oCommandMgr As CommandManager 
    oCommandMgr = ThisApplication.CommandManager 
Dim oControlDef As ControlDefinition 
    oControlDef = oCommandMgr.ControlDefinitions.Item("cmdCreateViewShare")
 
 	'Generate shared view
    oControlDef.Execute2(False)
    SendKeys.SendWait("{TAB 4}{ENTER}")
        
End Sub

I would like to automaticly get the link to the shared view:
By using the keys I am able to do it, but when writing it into ilogic, its not working properly:

'Copy link to clipboard - Is not working
	Dim SharedViewLink As String
	Clipboard.Clear
	SendKeys.SendWait("{TAB 3}{ENTER}")
	SharedViewLink = Clipboard.GetText
	MessageBox.Show(SharedViewLink, "Shared view link"

 Can anyone help to make this last bit fully automated?

Best regards Emil Jakobsen

0 Likes
Message 5 of 5

el_jefe_de_steak
Collaborator
Collaborator

I have the same issue. I believe the proper way to do this with code is to use Autodesk Platform Services (used to be called Autodesk Forge) to process your assembly. I have no experience personally but have spoken with someone who has accomplished this internally by exporting Inventor model to .SVF and using Forge to display it from a public cdn.

I will update here if I get it figured out at some point.

0 Likes