Inventor General Discussion

Inventor General Discussion

Reply
Contributor
11 Posts
0 Kudos
Registered: ‎12-01-2011
Post 1 of 5
Accepted Solution

New pdf-file after updating drawing-possible?

217 Views, 4 Replies
08-16-2012 02:53 AM

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?

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".

*Expert Elite*
2,546 Posts
889 Kudos
Registered: ‎09-13-2011
Post 2 of 5

Re: New pdf-file after updating drawing-possible?

08-16-2012 04:01 AM 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

Valued Mentor
475 Posts
280 Kudos
Registered: ‎07-25-2012
Post 3 of 5

Re: New pdf-file after updating drawing-possible?

11-27-2012 09:27 AM 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
*Expert Elite*
3,002 Posts
1,702 Kudos
Registered: ‎03-08-2006
Post 4 of 5

Re: New pdf-file after updating drawing-possible?

11-27-2012 09:40 AM in reply to: SeanFarr

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

 

 

 



  solution.png  Did you find this reply helpful ? If so please use the Accept as Solution or  Kudos button below.





Valued Mentor
475 Posts
280 Kudos
Registered: ‎07-25-2012
Post 5 of 5

Re: New pdf-file after updating drawing-possible?

11-27-2012 10:03 AM in reply to: Curtis_Waguespack

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
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post