Is there a trick to internationally running iLogic?

Is there a trick to internationally running iLogic?

oransen
Collaborator Collaborator
860 Views
3 Replies
Message 1 of 4

Is there a trick to internationally running iLogic?

oransen
Collaborator
Collaborator

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

 

 

 

 

 

 

0 Likes
Accepted solutions (1)
861 Views
3 Replies
Replies (3)
Message 2 of 4

Curtis_Waguespack
Consultant
Consultant
Accepted 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

 

 

Message 3 of 4

oransen
Collaborator
Collaborator

Nice!

 

For the "Model" pane I get "PmDefault" as the internal name, is that what you get?

 

 

0 Likes
Message 4 of 4

oransen
Collaborator
Collaborator

I suppose I could use ThisApplication.LanguageName and ThisApplication.LanguageCode and change the string appropriately...

0 Likes