In AutoCAD all commands have an international version name.
LINE = works in English AutoCAD
LINEA = works in Italian AutoCAD
_LINE = works in all AutoCADs
So if you program using the international command like _LINE you know it will work all over the world.
Now. In Inventor the "Model" panel is called "Modello" in Italian. So in iLogic this...
Dim oPane As BrowserPane
oPane = oDoc.BrowserPanes("Modello") ' "Model" in English
...will only work with the Italian version.
Is there a way of making it work in all language versions of Inventor?
Or maybe I can use an index instead of a string?
TIA,
Owen
Solved! Go to Solution.
Solved by Curtis_Waguespack. Go to Solution.
Hi @oransen
I think the best option is to use the pane's internal name, or the use the panes collection item number. here is an example showing how to get both from a part file.
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
Dim oPane As BrowserPane
Dim oPanes As BrowserPanes
oPanes = ThisApplication.ActiveDocument.BrowserPanes
i = 1
For Each oPane In oPanes
oName = oPanes.Item(i).Name
'show the name and item number of each pane in the collection
MessageBox.Show("'" & oName & "' is item number " & i & " in the panes collection")
i = i + 1
Next
'Activate the "favorites" pane by using item number
'and display the internal name
oPanes.Item(1).Activate
InputBox("Internal name of the " & oPanes.ActivePane.Name & " pane:","iLogic" ,oPanes.ActivePane.InternalName)
'Activate the "model" pane by using item number
'and display the internal name
oPanes.Item(2).Activate
InputBox("Internal name of the " & oPanes.ActivePane.Name & " pane:","iLogic" ,oPanes.ActivePane.InternalName)
'Activate the "favorites" pane by using internal name
oPanes.Item("{45C25AFD-68BD-4379-9A3E-7206E3E2BF08}").Activate
Nice!
For the "Model" pane I get "PmDefault" as the internal name, is that what you get?
I suppose I could use ThisApplication.LanguageName and ThisApplication.LanguageCode and change the string appropriately...
Can't find what you're looking for? Ask the community or share your knowledge.