Announcements
Due to scheduled maintenance, the Autodesk Community will be inaccessible from 10:00PM PDT on Oct 16th for approximately 1 hour. We appreciate your patience during this time.
Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is there a trick to internationally running iLogic?

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
oransen
329 Views, 3 Replies

Is there a trick to internationally running iLogic?

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

 

 

 

 

 

 

Labels (1)
3 REPLIES 3
Message 2 of 4
Curtis_Waguespack
in reply to: oransen

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
in reply to: Curtis_Waguespack

Nice!

 

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

 

 

Message 4 of 4
oransen
in reply to: oransen

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.

Post to forums  

Autodesk Design & Make Report