Skip the VDS Dialog and show the default Inventor Dialog

Skip the VDS Dialog and show the default Inventor Dialog

MUM_dloew
Enthusiast Enthusiast
87 Views
7 Replies
Message 1 of 8

Skip the VDS Dialog and show the default Inventor Dialog

MUM_dloew
Enthusiast
Enthusiast

Hello,

 

i search for a way to skip the VDS dialog and show the default Inventor dialog.

With $dsWindow.CancelWindowCommand.Execute($this) i can abort the dialog, but nothing elde happens.

 

have anyone an idea?

--------------------------------------
Daniel Loew
Application Engineer

Inventor | AutoCAD / M | Vault | Fusion 360

Kudos are greatly appreciated. Everyone likes a thumbs up!

Please Accept As Solution if this resolves your issue, to help others benefit and locate it.
0 Likes
88 Views
7 Replies
Replies (7)
Message 2 of 8

Markus.Koechl
Autodesk
Autodesk

Hi Daniel, could you provide more details about the context and workflow? There are two default options to suppress VDS dialogs showing up: SkipVdsForProperty and the AddIn Disable/Enable configuration. Without understanding the intent, I can hardly suggest a solution path.



Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
0 Likes
Message 3 of 8

MUM_dloew
Enthusiast
Enthusiast

hi Markus,

 

The Customer starts a new 3d Document. when he click save he will have the ability to use the Inventor default save dialog. Not all files must be saved with VDS dialog.

When i click on abort in the VDS dialog the process end.

 

I can't set it with the SkipPropertie in the InventorConfig. Then i must create 2 Templates. One for Save with VDS, one for Save without.

 

--------------------------------------
Daniel Loew
Application Engineer

Inventor | AutoCAD / M | Vault | Fusion 360

Kudos are greatly appreciated. Everyone likes a thumbs up!

Please Accept As Solution if this resolves your issue, to help others benefit and locate it.
0 Likes
Message 4 of 8

Markus.Koechl
Autodesk
Autodesk

Hi Daniel, in this case, users can use the File -> Save Copy As command. For new files, it does not copy, and this command is intentionally excluded from VDS events. So, this is the "backdoor" that the user can take if they decide to skip. The only customization I see is bringing this command from the nested File -> Save As -> Save Copy As to the main ribbon for frequent use; you could do this quickly as an iLogic command.



Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
0 Likes
Message 5 of 8

MUM_dloew
Enthusiast
Enthusiast

Hi,

the the VDS show after the save up, because he will set the requestet properties. I unload now first the DS , show me an Savedialog, and restart the addon. I dont know, how i get the Inventor standard save dialog. Her is my code:

 

Imports System.Windows.Forms

Dim unloadDS As Inventor.ControlDefinition = ThisApplication.CommandManager.ControlDefinitions.Item("VaultUnloadDataStandard")
unloadDS.Execute2(True)


Try
    ' Aktives Dokument holen
    Dim doc As Inventor.Document = ThisDoc.Document

    ' Standardwerte vorbereiten
    Dim filter As String = "Alle Dateien (*.*)|*.*"
    Dim defaultExt As String = "ipt"

    ' Dokumenttyp auswerten
    Select Case doc.DocumentType
        Case Inventor.DocumentTypeEnum.kPartDocumentObject
            filter = "Teil (*.ipt)|*.ipt|Alle Dateien (*.*)|*.*"
            defaultExt = "ipt"

        Case Inventor.DocumentTypeEnum.kAssemblyDocumentObject
            filter = "Baugruppe (*.iam)|*.iam|Alle Dateien (*.*)|*.*"
            defaultExt = "iam"

        Case Inventor.DocumentTypeEnum.kDrawingDocumentObject
            filter = "Zeichnung (*.idw)|*.idw|Zeichnung (*.dwg)|*.dwg|Alle Dateien (*.*)|*.*"
            defaultExt = "idw"

        Case Else
            ' Für Sonderfälle (Präsentation, etc.)
            filter = "Alle Dateien (*.*)|*.*"
            defaultExt = "ipt"
    End Select

    ' SaveFileDialog erzeugen
    Dim dlg As New SaveFileDialog()
    dlg.Title = "Speichern unter"
    dlg.Filter = filter
    dlg.DefaultExt = defaultExt
    dlg.FileName = IO.Path.GetFileName(doc.FullFileName)
    dlg.AddExtension = True
    dlg.OverwritePrompt = True
    dlg.RestoreDirectory = True

    ' Dialog anzeigen
    If dlg.ShowDialog() = DialogResult.OK Then
        Dim targetPath As String = dlg.FileName

        Try
            ' SaveAs mit Wechsel auf neuen Namen
            doc.SaveAs(targetPath, True)
            ' MessageBox.Show("Datei gespeichert: " & targetPath, "Erfolg", MessageBoxButtons.OK, MessageBoxIcon.Information)
        Catch ex As Exception
            MessageBox.Show("Speichern fehlgeschlagen: " & ex.Message, "Fehler", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End Try
    End If

Catch ex As Exception
    MessageBox.Show("Fehler in der Regel: " & ex.Message, "Fehler", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try

Dim loadDS As Inventor.ControlDefinition = ThisApplication.CommandManager.ControlDefinitions.Item("VaultLoadDataStandard")
loadDS.Execute2(True)
--------------------------------------
Daniel Loew
Application Engineer

Inventor | AutoCAD / M | Vault | Fusion 360

Kudos are greatly appreciated. Everyone likes a thumbs up!

Please Accept As Solution if this resolves your issue, to help others benefit and locate it.
0 Likes
Message 6 of 8

Markus.Koechl
Autodesk
Autodesk

Hi @MUM_dloew, I apologize, but I believe we are not on the same page. I didn't propose writing an iLogic function to provide a Save As dialog. I proposed to leverage the built-in command File -> Save As -> Save Copy As. First, does this command fulfill your customer's expectation of getting a standard dialog instead of the VDS? If yes, you might streamline the number of clicks by adding a button that performs the Save As Copy with a single click. I was wrong, we don't need an iLogic button (a rule calling the Save As Copy), we can add the Save As Copy as a user command directly: 

MarkusKoechl_0-1758529912167.png

I hope this clarifies.



Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
0 Likes
Message 7 of 8

MUM_dloew
Enthusiast
Enthusiast

Thats right, but when i use the save copy as, vds prompts. i have added a video the show waht I mean.

 

 

--------------------------------------
Daniel Loew
Application Engineer

Inventor | AutoCAD / M | Vault | Fusion 360

Kudos are greatly appreciated. Everyone likes a thumbs up!

Please Accept As Solution if this resolves your issue, to help others benefit and locate it.
0 Likes
Message 8 of 8

Markus.Koechl
Autodesk
Autodesk

OK, I see. It appears that Save Copy As is registered to provide the Save Location and Vault Numbering, but not to disable the VDS compliance check. Having this in mind, I suggest (and validated this time) adding the copy commands to the list of disabled commands for VDS: VDS provides a copy command, so there is no reason to keep one of the defaults subscribed to VDS. 

MarkusKoechl_0-1758552481059.png

 



Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
0 Likes