What's new

Language indepented

idslk

Alibre Super User
Hello,

is there anybody out there who can tell me how to use things like the following correctly:
Reference_XYPlane.JPG
I'm running a german installation and there the "XY-Plane" is named "XY-Ebene".
Every "English-Script" which i tried up to now failed here.
I had to do little adaptions also i'm not able to test if my scripts will run not only on my computer...
I hope there is a better way then this little workaround for german and english.
Something like this should work. After the definition XYPlane can be used as the PlaneName for origin planes.
Code:
CP = CurrentPart()

try:
 CP.GetPlane('XY-Ebene')
 print 'Deutsch'
 XYPlane = 'XY-Ebene'
 YZPlane = 'YZ-Ebene'
 ZXPlane = 'ZX-Ebene'

except:
 CP.GetPlane('YX-Plane')
 print 'English'
 XYPlane = 'XY-Plane'
 YZPlane = 'YZ-Plane'
 ZXPlane = 'ZX-Plane'
Please let me know if you have a solution.

Thanks in advance
Stefan
 
I'm running a german installation and there the "XY-Plane" is named "XY-Ebene".
Every "English-Script" which i tried up to now failed here.
Hi Stefan -- Meine deutsch sehr schlect ist. The real issue is the language interface in Alibre. (Can you imagine what it must be like in (say) Japanese, Chinese, or Arabic?) I know that Generic CADD had a "language specific command and annotation" module that handled something approaching 90% of these "issues." I have no clue what "tools" exist for such things today 00 -- but it would be worth looking into. --- Lew
 

oldfox

Alibre Super User
Stefan, I have had to contend with this also. I just load my script into another editor than AlibreScript. Then I start with the first NON-English instance
of a "fixed" name and use find-replace > replace all. Done deal. Everything that needs to be changed is now in English. But wait...!!!
AlibreScript WILL have find/replace in the next release according to Mr. Max. (me doing happy dance) Then you can forget about loading into another editor. :D
 

ajayre

Alibre Super User
idslk, you are calling the function GetPlane(), which is different to the property you are looking at in the reference. The GetPlane function requires a matching name to what is shown in the design explorer. It's precisely because of this problem that I added the language-independent property that you are looking at. Try this:

Code:
MyPlane = CP.XYPlane

Andy
 

idslk

Alibre Super User
Hello Andy,

Perfect, Thank you!:D
I've tried it like:
Code:
ZXPlane_1 = CP.AddPlane('ZXPlane_1',CP.ZXPlane ,CP.XAxis,-Angle)
It worked perfect.

@Lew_Merrick : looks like were can get some kind of language independent ;)

@oldfox: I hope we will get the find and replace :)

Best Regards
Stefan
 
Stefan -- I served my apprenticeship as a Tool & Die Machinist under a German Guild Master Machinist, so learned 1st-Angle Projection Drafting. It took me more than a decade to become "comfortable" in 3rd-Angle Projection Drafting. This regularly allows me to prove that I am as sharp as a drill and twice as boring.
 
Top