Hallo erstmal,
bei den Inventor-API-Beispielen scheint etwas passendes zu sein zur "AddBaseViewMethod":
Public Sub AddBaseViewWithRepresentations()
' Set a reference to the drawing document.
' This assumes a drawing document is active.
Dim oDrawDoc As DrawingDocument
Set oDrawDoc = ThisApplication.ActiveDocument
'Set a reference to the active sheet.
Dim oSheet As Sheet
Set oSheet = oDrawDoc.ActiveSheet
' Create a new NameValueMap object
Dim oBaseViewOptions As NameValueMap
Set oBaseViewOptions = ThisApplication.TransientObjects.CreateNameValueMap
' Set the representations to use when creating the base view.
Call oBaseViewOptions.Add("PositionalRepresentation", "MyPositionalRep")
Call oBaseViewOptions.Add("DesignViewRepresentation", "MyDesignViewRep")
Call oBaseViewOptions.Add("DesignViewAssociative", True)
' Open the model document (corresponding to the "MyLODRep" representation).
Dim strFullDocumentName As String
strFullDocumentName = ThisApplication.FileManager.GetFullDocumentName("c:\temp\reps.iam", "MyLODRep")
Dim oModel As Document
Set oModel = ThisApplication.Documents.Open(strFullDocumentName, False)
...
End Sub
Sowas könnte man in die IDW-Vorlage als AutoNew-Makro reinpacken.
Jetzt müsste man noch wissen, wie man den Parameter rüberbekommt, der die Modell-Datei angibt.
Gruß
Ruprecht
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP