Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Export To PDF options

ACEDeSmedt
Advocate

Export To PDF options

ACEDeSmedt
Advocate
Advocate

While exporting to PDF Through VBA (api), it is not possible to alter the option Print excluded sheets and Display Published File in Viewer. (see screenshot):Export -> PDF -> optionsExport -> PDF -> options

 What I tried so far without success:

  • Searching for the options here on the forum: only 6 options found.
  • Using the Translator.HasSaveCopyAsOptions to get the default options:
    I've found 43 options, including the previous 6 and an options Launch_Viewer
  • Launch_Viewer = False didn't work
  • I've tried ViewPDFWhenFinished = False (option found for 3D PDF)

Any help or suggestion in the right direction would be welcome.

=================================
If this is the solution, push the solution button :winking_face: (and maybe some kudos)
Autodesk Product Design Suit - Ultimate edition (Subscription)
0 Likes
Reply
671 Views
3 Replies
Replies (3)

clutsa
Collaborator
Collaborator

I'll agree I can't find that option. Can you try this...

Dim Doc As DrawingDocument = ThisApplication.ActiveDocument
Dim MyArrayList As New ArrayList
For Each oSheet As Sheet In Doc.Sheets
	If oSheet.ExcludeFromPrinting Then 
		MyArrayList.Add(oSheet.Name)
		oSheet.ExcludeFromPrinting = False
	End If	
Next

'your code to export pdf here

For Each oSheet As Sheet In Doc.Sheets If MyArrayList.Contains(oSheet.Name) Then oSheet.ExcludeFromPrinting = True Next

 

If I've helped you, please help me by supporting this idea.
Mass Override for Each Model State

Custom Glyph Icon for iMates

0 Likes

chandra.shekar.g
Autodesk Support
Autodesk Support

@ACEDeSmedt,

 

Engineering team knows about Launch_Viewer option which is not working for PDF translator. A change request is already created with engineering team and details are given below.

 

INVGEN - 2958 - API: The Launch_Viewer option for PDF translator does not work (Display Published File in Viewer)

 

As a workaround, you can try suggestion in below forum discussion link.

 

https://forums.autodesk.com/t5/inventor-customization/pdfaddin-option-quot-launch-viewer-quot-true-o...

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes

mslosar
Advisor
Advisor

Is this working yet?

0 Likes