Message 1 of 10
ilogic code to open PDF export Dialogue box
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
hi all,
I am looking to write some ilogic code to open up the PDF Export dialogue box, File - Export - PDF.
I want to use this in conjunction with some code that updates my Plot Date on my dwg.
I am planning to set up a Form button that first updates the Plot date then opens the PDF Export dialogue box.
i have found some code that does the first part (below) but am struggling to find a way to open the DF Export dialogue box after.
if anyone could help that would be great!
'define the drawing Dim odrawdoc As DrawingDocument odrawdoc = ThisApplication.ActiveDocument 'define the property set customPropertySet = odrawdoc.PropertySets.Item("Inventor User Defined Properties") 'define the date string Dim PlotDate As Date PlotDate = Now 'define the time string Dim PlotTime As String PlotTime = Now.ToShortTimeString 'define the user name string Dim PlotName As String PlotName= ThisApplication.UserName '---------------- find or create custom properties ------------- 'look for the custom propety and add it if not found Try prop = customPropertySet.Item("Plotdatestamp") Catch customPropertySet.Add("", "Plotdatestamp") End Try 'look for the custom propety and add it if not found Try prop = customPropertySet.Item("Plottimestamp") Catch customPropertySet.Add("", "Plottimestamp") End Try 'look for the custom propety and add it if not found Try prop = customPropertySet.Item("PlotAuthor") Catch customPropertySet.Add("", "PlotAuthor") End Try '---------------- set the property values ----------------------- 'set the date property iProperties.Value("Custom", "Plotdatestamp") = PlotDate 'set the timeproperty iProperties.Value("Custom", "Plottimestamp") = PlotTime 'set the name property iProperties.Value("Custom", "PlotAuthor") = PlotName 'update the file InventorVb.DocumentUpdate() 'define the property set customPropertySet = ThisDoc.Document.PropertySets.Item("Inventor User Defined Properties") 'look for the custom propety and add it if not found Try prop = customPropertySet.Item("Year") Catch customPropertySet.Add("", "Year") End Try 'set custom ipropety to copyright year iProperties.Value("Custom", "Year") = Now.ToString("yyyy")
thanks in advance