Problem

In some cases it is necessary to know, if ArchiCAD is running on MacOS or Windows. GDL provides no functionality for this, but a GDL expert has found a trick.

Solution

Requesting the ArchiCAD program file name returns on Windows platform the extension of the .exe file.

Script

!»» Request name and check for extension.
sts=REQUEST("Name_of_program", "",nameP)
Dose=(STRSTR(nameP,".EXE") OR STRSTR(nameP,".exe"))

!»» set separator for folder hierarchy
IF Dose THEN Slash="\" ELSE Slash=":"

!»» set vertical aberration of bitmap - UI_INFIELDs
IF Dose THEN UIdelaX=4 ELSE UIdelaX
=1

Script - Differentiated solution

!»» Request name
GDL=REQ("GDL_version")

sts=REQUEST("Name_of_program", "",nameP,fullnameP,pathP)

!»» Check for version
IF
GDL>1.516 THEN
  !»» ArchiCAD 10+
 
Dose=(STRSUB(pathP,STRSTR(pathP,fullnameP)-1,1)="\")
  ELSE
  IF GDL>=1.412 OR GDL<1.279 THEN
    !»»
ArchiCAD 7- / ArchiCAD 9
   
Dose=(STRSTR(nameP,".EXE") OR STRSTR(nameP,".exe"))
    ELSE
    !»» ArchiCAD 8.x bug in REQUEST: No script known to check.
    ENDIF
  ENDIF

!»» set separator for folder hierarchy
IF Dose THEN Slash="\" ELSE Slash=":"

!»» set vertical aberration of bitmap - UI_INFIELDs
IF Dose THEN UIdeltaX=4 ELSE
UIdeltaX=1

Um unsere Webseite für Sie optimal zu gestalten und fortlaufend verbessern zu können, verwenden wir nur essenzielle Cookies.
Durch die weitere Nutzung der Webseite stimmen Sie der Verwendung von Cookies zu.
Weitere Informationen zu Cookies erhalten Sie in unserer Datenschutzerklärung