iLogic Print Issues with Windows 11

iLogic Print Issues with Windows 11

nowell.colsenXK53F
Enthusiast Enthusiast
251 Views
2 Replies
Message 1 of 3

iLogic Print Issues with Windows 11

nowell.colsenXK53F
Enthusiast
Enthusiast

Anyone having issues with  ilogic print rules that use " Import System.Windows.Forms" with Windows 11? it opens the Window dialog box looking only at my desktop. Will not allow me access to any other location.

 

Import System.Windows.Forms

' Creates a 'folder browser' to allow user to pick a directory location' This selected directory location is then used for a PDF export operation
' Get current location of this file Dim ExportPath As String = ThisDoc.Path oFolder = "C:\Work\Designs\CIW Check Print\" ' Check that this file has been saved and actually exists on disk If String.IsNullOrEmpty(ExportPath) Then MsgBox("This file has not yet been saved and doesn't exist on disk! - please save it first",64, "Formsprag iLogic") Return End If ' Define folder browse dialog Dim Dialog = New FolderBrowserDialog() ' Set options for folder browser dialog Dialog.SelectedPath = ExportPath Dialog.ShowNewFolderButton = True Dialog.Description = "Choose Folder for Export..." ' Show dialog box If DialogResult.OK = Dialog.ShowDialog() Then ' User clicked 'ok' on dialog box - capture the export path ExportPath = Dialog.SelectedPath & "\" Else ' User clicked 'cancel' on dialog box - exit Return End If oFileName = ThisDoc.FileName(False) 'without extension oRevNum = iProperties.Value("Custom", "REV LEVEL") Select Case MsgBox("Save current PDF as CHECK SET?", vbYesNo, "IS THE PDF FOR RELEASE OR CHECK? ") Case vbYes ExportFilename = oFileName & " CHECK SET" & ".pdf" ExportPath = oFolder 'Check for the ExportPath folder and create it if it does not exist If Not System.IO.Directory.Exists(oFolder) Then System.IO.Directory.CreateDirectory(oFolder) End If Case vbNo ExportFilename = oFileName & " REV-" & oRevNum & ".pdf" ExportPath = Dialog.SelectedPath & "\" End Select Shell("explorer.exe " & oFolder, vbNormalFocus) '' Define the filename of the file to be exported '' In this Case it Is a PDF file extension 'ExportFilename = oFileName & ".pdf" 'oPDFAddIn = ThisApplication.ApplicationAddIns.ItemById _ '("{0AC6FD96-2F4D-42CE-8BE0-8AEA580399E4}") 'oDocument = ThisApplication.ActiveDocument 'oContext = ThisApplication.TransientObjects.CreateTranslationContext 'oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism 'oOptions = ThisApplication.TransientObjects.CreateNameValueMap 'oDataMedium = ThisApplication.TransientObjects.CreateDataMedium ''set PDF Options 'If oPDFAddIn.HasSaveCopyAsOptions(oDataMedium, oContext, oOptions) Then 'oOptions.Value("All_Color_AS_Black") = 1 'oOptions.Value("Remove_Line_Weights") = 1 'oOptions.Value("Vector_Resolution") = 400 'oOptions.Value("Sheet_Range") = Inventor.PrintRangeEnum.kPrintSheetRange 'End If ' Do export operation (using save as) Try ThisDoc.Document.SaveAs(ExportPath & ExportFilename, True) Catch MsgBox("File export failed...", 64, "Formsprag iLogic") End Try ThisDoc.Launch(ExportPath & ExportFilename)

 

0 Likes
252 Views
2 Replies
Replies (2)
Message 2 of 3

JelteDeJong
Mentor
Mentor

This is more of a question for a Microsoft forum. But I have seen this problem before (I think on this forum) Anyway I did a google search and found this post. maybe it helps you.

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

0 Likes
Message 3 of 3

nowell.colsenXK53F
Enthusiast
Enthusiast

Thanks

0 Likes