We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

ON_MAC, ON_PC commands: do they EXIST?

Anonymous
Not applicable


When you plan to open a file (using "OPEN" GDL command), if you're working on MAC on or a PC, the path syntax is different for that platform... so, isn't there a way to tell the object what is the platform to use...???

IF ON_MAC THEN PRINT "you are on a mac"
IF ON_PC THEN PRINT "you are on a PC"

Thank you
PWD
2 REPLIES 2
Frank Beister
Moderator
Try:
i=REQUEST ("Name_of_program", "",TeX)
if STRSTR(TeX,".EXE") or STRSTR(TeX,".exe") then Dose=1
if Dose then Slash="/" else Slash=":"
Returns in DOSE 1 vor PC and 0 for Mac.

Bases on a trick posted by Laurent? Karl? So far away, I don't remember.

Does not work under 8.x, because of a bug in the request-statement.
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
Anonymous
Not applicable
GREAT...

Only works in 9 and 7?

Thank you
Marco