You are currently reviewing an older revision of this page.
Symptoms
When trying to add drawing files to the Print Organizer in VBA, an error occurs: "Invalid Input".
Troubleshooting Steps
The following lines of code are to be executed:
Dim filePath As String filePath = "C:\My Folder\test.dgn"
CadInputQueue.SendKeyin "PRINT ORGANIZER ADD FILE" + filePath '<- at this line the error occurs
CadInputQueue.SendKeyin "PRINT PRINT ORGANIZER ALL"
The reason for the failure is the space in the path to the drawing file. The space in the path that leads to the file will be interpreted as 2 different parameters for the print command rather than one. To get around this problem with empty Draw, the path to the file must be placed in quotation marks. The filePath variable must contain quotation marks so that the keying looks like this:
PRINT ORGANIZER ADD FILE "C:\My Folder\test.dgn"
In the ASCII table, the quotation mark at the point 34 may be added as a character string in VBA Expressing Chr (34). If you can change the program line with the allocation for the drawing path to match the ofllowing, the Print Manager will accept it.
filePath = Chr(34) + "C:\My Folder\test.dgn" + Chr34)