Exporting multiple dwg with sheet number included

Exporting multiple dwg with sheet number included

Kramarcik
Participant Participant
749 Views
8 Replies
Message 1 of 9

Exporting multiple dwg with sheet number included

Kramarcik
Participant
Participant

I think this should be something easy but i cant find a way to do it. I want a single idw per project and include all the drawings inside this idw. I rename each sheet so that I can orient myself. After drawings are finished I usually save a copy as dwg for autocad which I sent to be manufactured. BUT as I renamed all the sheets, when they are exported as individual dwg files, they are not in order anymore, they are orded alphabeticaly. Inventor keep track of sheet number, can it generate the sheet number in the name of dwg file?

order of sheets in idworder of sheets in idw

Here is an order of drawing in idw, but when I batch generate individual files this info is lost, I used to manually rename the files to start with sheet number, but this is very time consuming.

 

Any help?

0 Likes
750 Views
8 Replies
Replies (8)
Message 2 of 9

blandb
Mentor
Mentor

Here is a rule I found online that I use. You will need to adjust to your liking. But it will combine all sheets of my drawing into a single pdf file. You can choose how and when to run this rule.

 

Dim doc = ThisDoc.Document
oPDFAddIn = 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

filePath = ThisDoc.Path
oDataMedium.FileName = filePath + "\" + iProperties.Value("Project", "Part Number")+" - REV " + iProperties.Value("Project", "Revision Number")+".pdf"
oOptions.Value("Sheet_Range") = Inventor.PrintRangeEnum.kPrintAllSheets
oOptions.Value("Remove_Line_Weights") = 1
'oOptions.Value("Vector_Resolution") = 4800
oPDFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)

MessageBox.Show("PDF CREATED!", "PDF PRINT")

 

Autodesk Certified Professional
0 Likes
Message 3 of 9

Kramarcik
Participant
Participant

does not work. Sorry I am very elementrary in ilogic, cannot troubleshoot yet

0 Likes
Message 4 of 9

blandb
Mentor
Mentor

Did you create a rule in the drawing? Can you post what the problem is?

Autodesk Certified Professional
0 Likes
Message 5 of 9

Kramarcik
Participant
Participant

I ran it one more time, on different idw and it worked, but:

the rule creates a singly .pdf file named "part name" - Rev A

 

What I want is to create individual .dwg files named like this:

"sheet number on idw" - "sheet name" or "part name".

 

I guess this can be achieved through ilogic only. Any help is appreciated 🙂

0 Likes
Message 6 of 9

A.Acheson
Mentor
Mentor

Here is a ilogic rule to sort browser nodes(sheets) . The sorting is done by sorting the list. This will likely sort alphabetically but you will need to read your page number. You should be able to modify the rule to rename and sort. You can have the post moved to the customization forum where you can get some help working through that. I have seen a rule thst renames and sorts but it is eluding me this morning. 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
Message 7 of 9

Kramarcik
Participant
Participant

I am an ilogic beginner so tough luck for me, but at least i know it can be done 🙂

0 Likes
Message 8 of 9

blandb
Mentor
Mentor

My apologies, I missed the dwg part. I just did a file export to DWG, and here is what I got:

 

This is my IDW:

 

blandb_0-1671119329188.png

 

Then in windows explorer it spit out:

 

blandb_1-1671119358866.png

 

It kept the original drawing name, because when prompted for a file name, whatever is typed in the box is what is placed in front of the new sheets as shown above. If I would of placed "-" I would of gotten:

 

blandb_2-1671119558232.png

 

But it is keeping the renamed sheets from the idw.

 

Autodesk Certified Professional
Message 9 of 9

Kramarcik
Participant
Participant

It does keep the names, but look at the order in your folder

Snímka obrazovky 2022-12-16 063026.png

I want to add the sheet number to the dwg (preferably not manually) to keep the same order of drawings as is in the idw.

0 Likes