Automatically naming sheets in a * .idw file.

Automatically naming sheets in a * .idw file.

farmerstain
Participant Participant
532 Views
3 Replies
Message 1 of 4

Automatically naming sheets in a * .idw file.

farmerstain
Participant
Participant

Hello.
I would ask for information if Inventor 2015 is able to automatically assign names of Sheets in the * idw file as one of the iProperties parameters from the 3d model of the * .iam or * .ipt file?
I will be grateful for any help.
Sincerely
Wojciech Janko

0 Likes
533 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable

I don't think Inventor can do this out of the box, but I'm sure it could be down with ilogic. 

0 Likes
Message 3 of 4

doug.johnston
Advocate
Advocate

Here is an ilogic program that I use that renames each sheet based on the part and/or assembly filename, but not tied to any iproperties.

 

'ilogic rule renames each drawing sheet to first part/model/ipn/etc view inserted into each drawing sheet
'Purpose: Push file name to sheet name
'21-Sept-16


Dim oDoc As Document
oDoc = ThisApplication.ActiveDocument
Dim oSheets As Sheets
oSheets = oDoc.Sheets
Dim oSheet As Sheet
Dim oDrawingView As DrawingView

'Iterate through sheets
For Each oSheet In oSheets
	Try 
		'Grab the first drawing view on the sheet
		oDrawingView = oSheet.DrawingViews(1)
	
		'Grab the model of the first drawing view
		oModel = oDrawingView.ReferencedDocumentDescriptor.ReferencedDocument 
	
		'Assign the sheet name based off of the file name, with the path and extension removed
		oSheet.Name = System.IO.Path.GetFileNameWithoutExtension(oModel.FullFileName)
	Catch
		'There is no drawing views
	End Try
Next 
  
InventorVb.DocumentUpdate()
 

 


---------------------------------------------------
It's not easy maintaining this level of insanity !!!!!
Message 4 of 4

farmerstain
Participant
Participant

Hello,
Thank you for your response 🙂
And are you able to modify this syntax to get the "Description" from iPreferences?
Thank you very much for all your help.
Sincerely
Wojtek

0 Likes