Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am working on a rule that will save my file in a location I'm picking. The file name is generated by parameters.
I am getting this security alert.
I do know if I save the file the rule will work but that defeats the purpose of the rule.
Here is the rule I'm using.
Dim oDoc As Document = ThisDoc.Document ' Get parameter values Dim oIT As String = Parameter("ITEM_TEXT") Dim oIN As String = Parameter("ITEM_NUMBER") Dim oJobN As String = Parameter("JOB_NUMBER") Dim oEDLIN As String = Parameter("EDLIN_NUMBER") ' Build filename Dim NewFileName As String = oJobN & " - " & oEDLIN & " - " & oIT & oIN &".ipt" ' Select folder Dim folderDlg As New System.Windows.Forms.FolderBrowserDialog folderDlg.Description = "Select folder to save file" If folderDlg.ShowDialog() <> System.Windows.Forms.DialogResult.OK Then Return End If Dim TargetFolder As String = folderDlg.SelectedPath ' Build filename from parameter Dim FileName As String = Parameter("PART_NUMBER") ' Full path Dim NewFilePath As String = System.IO.Path.Combine(TargetFolder, NewFileName) ' Save As ThisDoc.Document.SaveAs(NewFilePath, True) MessageBox.Show("File saved to:" & vbCrLf & NewFilePath)
If anyone has ideas for how I can get this to work that would be greatly appreciated.
Jarle
Solved! Go to Solution.
Download the prerelease of Hole Projector for Inventor 2027