Solved! Go to Solution.
Solved by dg2405. Go to Solution.
Scott Moyse
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Design & Manufacturing Technical Services Manager at Cadpro New Zealand
Co-founder of the Grumpy Sloth full aluminium billet mechanical keyboard project
Steve,
I am using Inv 2013, SP2-update3. My OS is Win7x64. I have also tested the app on Inv2014 (Win7-x64). Runs fine here.
You might want to contact the author of the app.
Kirk
The code in the 4th post of this thread is not intended to be placed in an idw. A macro is an externall file that can be ran from Inventor. You "could"store this file in your assemblies, but that can lead to problems.
The way I use this is I store this in a file, then when I need to run it, I do this:
1. open the assembly
2. go to Tools>VBA Editor.
3. In the VBA Editor, File>Load Project and pick the file that has the code.
4. Close the editor.
5. Back in Inventor, Tools >Macros. You should see "PrintRefIDWs" in the list. Pick it and then "Run".
That should get it going.
Attached is the VBA file that I use. You will have to rename it and add .ivb to the filename.
Kirk
I did this and it didn't work, can you give me a more detailed explaination on how to do this. I do not know programming very much.
There are two things being discussed in this thread. That might be the confusion. What are you trying to do.... print all the associated prints or add the QTY to the idw's?
Kirk
print the component and sub-assembly drawings from the main assembly. Although is there a way to also automatically add quantities to the individual drawings in an assembly?
What I posted in msg 24 above will print the idw's (assuming they are already created and are in your workspace). What part of the instructions are you having trouble with.
"Automatically" add quanities.....haha.... that depends on what you call a-u-t-o matic.
If you want, send me a email at karthurATfmi-solutionsDOTcom
Kirk
Hi there...
Ressurecting this old topic to try to get some help with this script.
Ive been using this for years now, and couldnt live without it, BUT...
Some of my IDW files have multiple sheets. How can i make it print all of the sheets within an IDW if there are more than one?
Some of my more complicated assemblies require more than one sheet to fit the information.
It seems that I can make extra idw files with similar names (say the assemply file name is 70230033.iam, i can have 70230033.idw and 70230033c.idw and the script will find both) But it will not print multiple sheets inside one IDW... any way to add this in?
Thanks!
@doum90 wrote:oPrintMgr = document.PrintManager
oPrintMgr.PrintRange = Inventor.PrintRangeEnum.kPrintAllSheets
Perfect! Thank you.
I dont know squat about coding but i got it to work.
I got a compile error the first time around so i ditched the "oPrintMgr = document.PrintManager" line and just added "oPrintMgr.PrintRange = Inventor.PrintRangeEnum.kPrintAllSheets" in after "Set oPrintMgr = ThisApplication.ActiveDocument.PrintManager" in the original script.
Works like a charm.
Glad it works for you. I had already added the "PrintRange=" to the code that we use because of teh issue you were having.
This is what my code now looks like.
Kirk
hi guys, Im Trying to print mi .idw, my paper size is C and I just have a regular printer, with the sixe paper A
if I do a print previo the drawing is not fitting in the A Size, but how can I print it?, is the anything like scale to print, or fit to paper as in autocad?. Please help mee I know It is possible because I had seen other persons did, but I didnt catch how they did
You just trying to print one sheet? Really should have started a new thread.
In the print drawing dialog, select your printer, then the properties in the top right. Here select the paper size you want to print to. "OK" out of that. Back in the print drawing dialog, choose "Best Fit". Now preview if that is what you want. If it is, click print.
Nice code. I would like to modify it, if possible:
Thanks.
@s.mccarthy wrote:
Nice code. I would like to modify it, if possible:
- Change the sheet size from A3 to something else i.e. 11x17, ANSI C, Arch D
- Change "Best Fit" to 1:1
- Access drawings that reference iPart members. These are currently not printing
Thanks.
S,
Feel free to modify it any way you want.
It probably does not work for the ipart children because the path+filename of the idw is not the same as the ipart member. You could test this theory by placing one of your idws into the folder with the children and then run the code. If it prints that idw, then that is the answer.
Kirk
Hi,
is there a way to convert drawings in a folder to PDF using Inventor VBA? I want to convert drawings of which i just have the path ("C:/temp/abc.idw" e.g.) in a loop. I don't want to use the a Print function, because i want to give the files a specified name in my loop.
I also haven't found a way to convert all idw files from one folder, so for example for each .idw file a .PDF file would be created with the same name and same path.
The parts are included in an assembly, but i don't want to open the assembly manually because they took a long time to open. So my code would have a input-window where the assembly or the path will be choosen (flat structure, all files in one folder because of "pack and go").
Also it would be awesome if i could keep the landscape/portrait setting of the drawing.
If they are all in a folder, just use the Autodesk Inventor Task Scheduler and create a task. You can add an entire folder.
Kirk
Thank you for your quick response.
Am i right? -> In the Task Scheduler i have to use a Print-Service, Converting is not directly available? -> I use PDF Creator -> To create like 50 single pdfs i have to accept 50 times the name of the new file (like after pressing "safe as")?
I have found a "AutoSave" flag in PDF Creater which would eliminate this dialouge. But for other Tasks i need the normal save-handling which means i would need to change this setting everytime?
I have used PDF Creator in the past, but I dont use it now. I know that you can set the Autosave to save the PDF and give it a name of the <Title>. Its been awhile so I am not sure of the syntax. Look at the PDF Creator options and you should be able to figure out what syntax to use for the filename.
Thats the way I save my pdfs now... just with Adobe Acrobat.
Kirk