Jetzt wo die Datei Schneckenblech-Parameter.ipt gefunden wird, geht es ohne Problem.
Ich habe ja 2019 und du 2018. Ich habe aber auch noch Inventor 2017 installiert. Also den gestartet und ein Blech erstellt und eine Zeichnung davon und dann die Regel ausgeführt==> Das gleiche Problem wie du!!
Lösung:
Ergänze oben:
SyntaxEditor Code Snippet
Imports Inventor.ViewOrientationTypeEnum
Imports Inventor.DrawingViewStyleEnum
Das es also so aussieht:

Ganzer Code
SyntaxEditor Code Snippet
Imports Inventor.ViewOrientationTypeEnum
Imports Inventor.DrawingViewStyleEnum
Sub Main()
Dim Zeich As DrawingDocument
Zeich = ThisApplication.ActiveDocument
Dim oSheet As Sheet
oSheet = Zeich.ActiveSheet
'Modell er esten Ansicht ermitteln
Dim Modell As Document
Modell = oSheet.DrawingViews.Item(1).ReferencedDocumentDescriptor.ReferencedDocument
'Pr�fen ob Modell Blechteil ist
Dim sDocumentSubType As String
sDocumentSubType = Modell.SubType
If sDocumentSubType = "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" Then
'Abwicklungsansicht erstellen
AddFlatPatternDrawingView (Modell.FullFileName)
'Symbol erg�nzen
Dim SymName As String
SymName = "CAD-CAM"
Dim oSketchedSymbolDef As SketchedSymbolDefinition
oSketchedSymbolDef = Zeich.SketchedSymbolDefinitions.Item(SymName)
Dim oTG As TransientGeometry
oTG = ThisApplication.TransientGeometry
Dim oSketchedSymbol As SketchedSymbol
oSketchedSymbol = Zeich.ActiveSheet.SketchedSymbols.Add(oSketchedSymbolDef, oTG.CreatePoint2d(15, 5), 0, 1)
Else
Exit Sub
End If
End Sub
Public Sub AddFlatPatternDrawingView(Modellpfad As String)
' a reference to the drawing document.
' This assumes a drawing document is active.
Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument
' a reference to the active sheet.
Dim oSheet As Sheet
oSheet = oDrawDoc.ActiveSheet
' Create a new NameValueMap object
Dim oBaseViewOptions As NameValueMap
oBaseViewOptions = ThisApplication.TransientObjects.CreateNameValueMap
' the options to use when creating the base view.
Call oBaseViewOptions.Add("SheetMetalFoldedModel", False)
' Open the sheet metal document invisibly
Dim oModel As Document
oModel = ThisApplication.Documents.Open(Modellpfad, False)
' Create the placement point object.
Dim oPoint As Point2d
oPoint = ThisApplication.TransientGeometry.CreatePoint2d(25, 20)
' Create a base view.
Dim oBaseView As DrawingView
oBaseView = oSheet.DrawingViews.AddBaseView(oModel, oPoint, 0.3, _
kDefaultViewOrientation, kHiddenLineRemovedDrawingViewStyle, _
, , oBaseViewOptions)
End Sub