Update Inventor internal naming of components

Update Inventor internal naming of components

jnowel
Advocate Advocate
204 Views
2 Replies
Message 1 of 3

Update Inventor internal naming of components

jnowel
Advocate
Advocate

I am a bit stumped on this issue (I think it should be fairly simple)

How to I make Inventor recognize the updated filenames of the components?
(see sample zip file)

 

/////////////////////////
Scenario:

 

1. First Save filenames:

Assembly1.iam

PART1.ipt

Part2.ipt

PaRt3.ipt

 

2. Corrected the filenames to "proper" case

Assembly1.iam

Part1.ipt

Part2.ipt

Part3.ipt

3.

a. even in windows explorer, I can see the proper case, but in the BOM, Inventor sees the old filename text case
b. iLogic Design Copy also sees the old text case. so, if I create a new set of copies with a prefix, they had the same text case as #1
c. if I save from Assembly1, all the reference components, the component filenames revert back to the original text case (as per #1).
For testing, I used below rule to "force" save them

For Each oRefDoc As Document In ThisDoc.Document.AllReferencedDocuments
	oRefDoc.Dirty = True
	oRefDoc.Save
Next


//////////////////

 

I even tried creating a copy of the components to save in proper case in a different drive. then using those files to overwrite those in the project workspace. But Inventor still see the old filenames text case.
Relocating files does not seem to work either.

I can rename the files, say from PART1.ipt to Part1-1.ipt then Save and rename again from Part1-1.ipt to Part1.ipt using Design Assistant and that would retain new filename text case. (but this solution is a bit tedious as the number of files that needed to be "renamed")

I could probably create a rule to save the components in different filenames then update all the file references so Inventor will refer to new filenames. And then update references again to the old filenames (with the proper text case)? But is there a better/simpler solution?

Also, I don't have Vault (if there was an option there but I cannot utilize)
Tried this using Inventor 2023.5

0 Likes
205 Views
2 Replies
Replies (2)
Message 2 of 3

jnowel
Advocate
Advocate
Just to add to this, Inventor detects the FullDocumentName property as per Windows explorer.
While FullFileName and File.FullFileName properties are as per the first save filenames.
(when viewed from the Assembly model)
 
For Each oRefDoc As Document In ThisDoc.Document.AllReferencedDocuments
	Logger.Info("")
	Logger.Info(oRefDoc.FullDocumentName)
	Logger.Info(oRefDoc.FullFileName)
	Logger.Info(oRefDoc.File.FullFileName)
Next
yields

 

INFO|
INFO|X:\_Projects\Part3.ipt
INFO|X:\_Projects\PaRt3.ipt
INFO|X:\_Projects\PaRt3.ipt

 

Using Task Scheduler > Update Design also reverts back the filename text case as per the original filename's text case

Is this just some weird Inventor "bug"?
Is there like a "refresh" command that I can use for Inventor to update its filename records to the filenames as per "what it sees now" vs "what it saw before"?

 

0 Likes
Message 3 of 3

WCrihfield
Mentor
Mentor

Interesting situation.  This is likely because the Document.FullFileName property, and the Document.DisplayName properties are Read/Write, while the Document.FullDocumentName property is ReadOnly.

What I am about to suggest is not really a solution, but rather a possible workaround, but you may be able to take advantage of the FileManager and its GetFullFileName & GetFullDocumentName methods (and maybe its (GetModelStateName method).  Because the FullDocumentName can include 'member' name at the end of the FullFileName value (within "<" & ">" brackets), when it represents a ModelState member, iPart member, or iAssembly member.  Those methods can be used for pulling full file name and model state name from a full document name, or can be used for assembling a new full document name from those pieces of information.

So, I'm thinking in odd situations like that, use an iLogic rule to iterate through AllReferencedDocuments, get the value of each document's FullDocumentName, use those methods to get the FullFileName from it, then get its file name, and use those to fill in that document's FullFileName property, and its DisplayName property.

Then, in the case of assembly components, you can iterate through each component occurrence, and set their names to an empty String to 'reset' them to their 'default' values, which should reflect the file names (or document display name).  Just some ideas.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes