Hello
I'm having trouble getting the display name from all the nodes in an assembly file.
I'm using the following code to iterate through the contents of the documents collection in two different computers
hoping that i get the same results. Instead of that, i'm getting a different outcome.
The problem is that, the COMPUTER A is returning the display name with an extension of the file (.ipt or .iam) and the COMPUTER B is returning
the name without extension (just what i need).
I know that i can check the display name and remove the extension with a few lines of code but i would like to know the reason of this
behavior.
The code is:
Sub test() ' Iterate through the contents of the Documents collection. Dim invDocument As Document For Each invDocument In ThisApplication.ActiveDocument.AllReferencedDocuments ' show display name MsgBox invDocument.DisplayName Next End Sub
Thank you in advance.
Solved! Go to Solution.
Solved by Curtis_Waguespack. Go to Solution.
Hi cvillar,
My guess is that one computer has the option to Hide Extensions for know file types enabled and the other does not.
You can check this using these steps (for Windows 7, it might vary a bit if you're using a different OS):
Also just as a tip for the future, generally programming questions of this type are best placed on the Inventor Customization forum:
http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/bd-p/120
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
Can't find what you're looking for? Ask the community or share your knowledge.