Showing results for 
Search instead for 
Did you mean: 

Printing failed from API




I would like to print my active view from Femap v11.3.2 with API, but after printing 3th times I become an error message:


PrintingError.jpgError Message

I tested with this simple API:

Sub Main
	Dim App As femap.model
	Set App=feFemap()
	'App.feRunCommand(1008, True )	'Printer Setup
	App.feFilePrint2(False, FPS_VIEW, "")
	'App.feFilePrint(False, False, FPS_VIEW, "", "")
End Sub

When I used File / Printer Setup... command, I could print again. Printing from menu was possible without error. I tried to printing to network laser printer and to PDF too, error message appeared (with feFilePrint2 and feFilePrint too).


When I printed to local printer, the first printing was successful, second deleted immediatly from print queue and after third appear the error message.


When I printed to PDF, the first printing was successful, second created a PDF with header and footer only (without the active view), after third printing appear the error message.


When I uncommented the fourth line in API (Printer Setup command) I could print without error with this API.


Best regard


Peter Kaderasz




I have one more question:


I didn't find API command to page setup and printer setup. I tried use the System.Drawing.Printing, but the available reference System.Drawing.dll (2.0) doesn't know the necessery commands, and I can't add other versions to References.

Is there a way to page setup and printer setup in API?


Peter Kaderasz