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

Collaboration with other software
About model and data exchange with 3rd party solutions: Revit, Solibri, dRofus, Bluebeam, structural analysis solutions, and IFC, BCF and DXF/DWG-based exchange, etc.

SQL Parameters

Anonymous
Not applicable
Entering the "SELECT parameters FROM Objects" gives me all Parameters of every Object. they seem to be in one extra table in the column "Parameters". How can I Select Objects having one single Parameter (f.e. "testparameter001" in common.
6 REPLIES 6
Akos Somorjai
Graphisoft
Graphisoft
kmcw_ wrote:
Entering the "SELECT parameters FROM Objects" gives me all Parameters of every Object. they seem to be in one extra table in the column "Parameters". How can I Select Objects having one single Parameter (f.e. "testparameter001" in common.
Hi,

The SQL queries are not supported any more officially (the last supported version was ARCHICAD 18 ), so don't rely on them. Someone else here may be able to answer you question.

Sorry, Akos
Anonymous
Not applicable
But it still works 😉 (AC 20) I just can't find the right syntax For objects.parameters
ST_SQl_AC.PNG
Ralph Wessel
Mentor
kmcw_ wrote:
But it still works 😉 (AC 20) I just can't find the right syntax For objects.parameters
I'd strongly recommend not using unsupported technology – you're setting yourself up for a disaster. If GS hasn't updated it beyond 20, the fact that it appears to work is coincidental and almost certainly unstable.
Ralph Wessel BArch
Software Engineer Speckle Systems
runxel
Legend
The command is already removed in 21. It's sad, but I guess there were just too few users who actually used it.
Lucas Becker | AC 27 on Mac | Graphisoft Insider Panelist | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text | My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»
Anonymous
Not applicable
Actually it works fine with:
SELECT LIBRARY_PART_NAME, XX.PARAMETERS.NAME, XX.PARAMETERS.VALUE
FROM FLAT( OBJECTS, PARAMETERS) AS XX

BUT ehen I whant to add

WHERE XX.PAREMETER.VALUE=1

I get an error that It cant transform datatype GDLVARIANT to typ 1. I tried to use
CAST (XX.PARAMETERS.VALUES AS *) * for "*" I tried: "CHAR", "VARCHAR" or "string"
But the error remains the same. Can somone tell me how to transvorm a "GDLVARIANT" into something I can use? THX
Mihaly Palenik
Graphisoft
Graphisoft
Hello,

Try to use this query:
SELECT LIBRARY_PART_NAME, XX.PARAMETERS.NAME, XX.PARAMETERS.VALUE 
FROM FLAT(OBJECTS, PARAMETERS) AS XX 
WHERE CAST (XX.PARAMETERS.VALUE AS CHAR(50)) = '1' 


It works in ArchiCAD 20.

Best,
Mihály