AnsweredAssumed Answered

Export to PDF does not work

Question asked by Lars Ahlzen on Sep 17, 2018
Latest reply on Sep 17, 2018 by Lars Ahlzen

Hello again

 

I wrote a script where first I make a drawing from a model and then run the script so it outputs the same drawing for every configuration. I link the script. The problem I have is on the line:

 

boolstatus = swModelDocExt.SaveAs(OutputPath & configName & ".pdf", 0, 0, swExportPDFData, 0, 0)

 

where it returns the error "Object variable or With block not set" and I have no idea why it does that. The PDF export works on another script but when I compare them I can't find where they are different. Or why my script doesn't work. So I have decided to come here with hat in hand to see if the community might help me out. Please let me know if everything is in the script. It should be 4 modules. AlignDimensions, positioning, scaleview constant and OutputDrwConfig.

 

Thank you in advanced

Outcomes