Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

New pdf-file after updating drawing-possible?

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
kaptenmjau
476 Views, 4 Replies

New pdf-file after updating drawing-possible?

Hey

I have a drawing of a part that I want to change the dimensions many times.

When I edit the lenght and width in the part, the drawing updates automatically.

But is it possible to update the pdf file (of drawing) automatically after editning the dimensions in part?

 Or do I have to update (save as to pdf) everytime I create a new odimensions?

4 REPLIES 4
Message 2 of 5
mrattray
in reply to: kaptenmjau

You could use an iLogic rule to save as pdf every time you save the updated drawing. I don't know why you would want it to save every time you add a dimension.

 

If you look in the iLogic editor there is a snippet for saving out as pdf. Just edit it so that it's saving where you want with the filename and options you want, and add it to your iLogic event triggers under "Before Save".

Mike (not Matt) Rattray

Message 3 of 5
SeanFarr
in reply to: kaptenmjau

Hi, I know this is an older post, but instead of making a new post on a topic that has been discussed a lot, I was wondering if you could share your rule that you use to create pdf's after saving/updating an idw?

 

What I am looking for is a simple rule that will generate a pdf in the same location as the idw being created/edited.

 

I have looked around in the vba editor, but can't seem to put anything together, I can't find the snippet the mrattray was talking about when he replied to your post.

 

thanks

 

Sean

Sean Farr
Product Designer at TESInc.ca

Inventor Professional 2014-Update 2 - AutoCAD Electrical 2014
Win7-x64 | ASUS P8Z77-V | i7 3770 -3.4 GHz | 32GB RAM |
240GB SSD | nVidia GTX 670 4GB - 320.49
Message 4 of 5

Hi SeanFarr,

 

The snippet that mrattray was talking about can be found in the iLogic rule editor, but here is a version of it as wel. This rule gets the drawing path and saves the PDF to the same folder:

 

'Save PDF with options
path_and_namePDF = ThisDoc.PathAndFileName(False) ' without extension
PDFAddIn = ThisApplication.ApplicationAddIns.ItemById("{0AC6FD96-2F4D-42CE-8BE0-8AEA580399E4}")
oDocument = ThisApplication.ActiveDocument
oContext = ThisApplication.TransientObjects.CreateTranslationContext
oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism
oOptions = ThisApplication.TransientObjects.CreateNameValueMap
oDataMedium = ThisApplication.TransientObjects.CreateDataMedium

If PDFAddIn.HasSaveCopyAsOptions(oDataMedium, oContext, oOptions) Then
'oOptions.Value("All_Color_AS_Black") = 0
oOptions.Value("Remove_Line_Weights") = 1
oOptions.Value("Vector_Resolution") = 400
oOptions.Value("Sheet_Range") = Inventor.PrintRangeEnum.kPrintAllSheets
'oOptions.Value("Custom_Begin_Sheet") = 2
'oOptions.Value("Custom_End_Sheet") = 4
End If

'Set the destination file name
oDataMedium.FileName = path_and_namePDF & ".pdf"

On error goto handlePDFLock
'Publish document.
Call PDFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)

exit sub

handlePDFLock:
MessageBox.Show("PDF could not be saved, most likely someone else has it open.", _
"No PDF for you " & ThisApplication.GeneralOptions.UserName & "!")
Resume Next

You can refer to this link to see how an event trigger can be added so that the rule will run when the file is saved:

http://inventortrenches.blogspot.com/2012/01/creating-basic-ilogic-rule-with-event.html

 

Some related links:

http://inventortrenches.blogspot.com/2012/08/disable-automatic-pdf-display.html

http://inventortrenches.blogspot.com/2011/07/ilogic-to-save-pdf-files-to-new.html

http://inventortrenches.blogspot.com/2011/02/ilogic-code-for-parts-lists-title.html

 

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

 

 

 

Message 5 of 5

There is quite a few rules out there that do more than what I wanted, this is exactly what I was looking for, simple and easy.

 

Thanks Curtis!

 

Sean

 

 

Sean Farr
Product Designer at TESInc.ca

Inventor Professional 2014-Update 2 - AutoCAD Electrical 2014
Win7-x64 | ASUS P8Z77-V | i7 3770 -3.4 GHz | 32GB RAM |
240GB SSD | nVidia GTX 670 4GB - 320.49

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report