Developer forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Can Renovation status be used for different 2D scripting?

Mats_Knutsson
Advocate
Thinking of trees and using renovation filters... new tree, existing, to be removed... I would like the 2D script to use renovation status....is is possible and/or doable?
/Mats
AC 24 SWE Full
HPZbook 32GB i7 7820HQ 2,9 GHz
Quadro M2200 2GB
9 REPLIES 9

DGSketcher
Virtuoso
Seems like an important missed variable in GDL. The only apparent access is through Autotext values but I think this is restricted to certain applications such as TEXT2.
Apple iMac macOS Big Sur / AC24UKI (most recent builds)

Braza
Newcomer
GDL wrote:
Built-in Properties
These commands return the folder names, parameter names and parameter values of built-in properties on the "Classification and Properties"
tabpage (ID and Categories, Renovation, IFC Properties).
I never tried, but perhaps Build-in Properties can do the trick. (Page 519)
Paulo Henrique Santos, Architect
AC24_INT#3008 / I7 / 16Gb / 512Mb SSD / Windows 10

Mats_Knutsson
Advocate
Braza wrote:
GDL wrote:
Built-in Properties
These commands return the folder names, parameter names and parameter values of built-in properties on the "Classification and Properties"
tabpage (ID and Categories, Renovation, IFC Properties).
I never tried, but perhaps Build-in Properties can do the trick. (Page 519)
Hmm..would be interesting to see if it can be used. I'm not that much into GDL to understand how i would use it.
AC 24 SWE Full
HPZbook 32GB i7 7820HQ 2,9 GHz
Quadro M2200 2GB

Dominic Wyss
Booster
It works but you will get a localized string.
Would be nice if Graphisoft could offer a global integer parameter (-1; 0; 1)

From gdl.graphisoft.com:
DIM folderNamesArray[]
n = APPLICATION_QUERY ("OwnCustomParameters", "GetParameterFolderNames()", folderNamesArray)

for i = 1 to vardim1(folderNamesArray) step 3

    DIM parNamesArray[]
    querystring = "GetParameterNames(" + folderNamesArray + ")"
    n = APPLICATION_QUERY ("OwnCustomParameters", querystring, parNamesArray)
    text2 0, 0, querystring
    add2 1, -1

    _nLines = 1
    for j = 1 to vardim1(parNamesArray) step 3

        parValue = ""
        querystring = "GetParameter(" + parNamesArray + ")"
        n = APPLICATION_QUERY ("OwnCustomParameters", querystring, parValue)
        text2 0, 0, querystring + ": " + parValue
        add2 0, -1
        _nLines = _nLines + 1

    next j

    del _nLines
    add2 0, -_nLines

next i

so in short
renoStatus = ""
_r = APPLICATION_QUERY ("OwnCustomParameters", "GetParameter(Renovation.RenovationStatus)", renoStatus)

text2 0, 0, renoStatus

Cheers
AC23 CHE - macOS Catalina

Mats_Knutsson
Advocate
Dominic wrote:
It works but you will get a localized string.
Would be nice if Graphisoft could offer a global integer parameter (-1; 0; 1)

From gdl.graphisoft.com:
DIM folderNamesArray[]
n = APPLICATION_QUERY ("OwnCustomParameters", "GetParameterFolderNames()", folderNamesArray)

for i = 1 to vardim1(folderNamesArray) step 3

    DIM parNamesArray[]
    querystring = "GetParameterNames(" + folderNamesArray + ")"
    n = APPLICATION_QUERY ("OwnCustomParameters", querystring, parNamesArray)
    text2 0, 0, querystring
    add2 1, -1

    _nLines = 1
    for j = 1 to vardim1(parNamesArray) step 3

        parValue = ""
        querystring = "GetParameter(" + parNamesArray + ")"
        n = APPLICATION_QUERY ("OwnCustomParameters", querystring, parValue)
        text2 0, 0, querystring + ": " + parValue
        add2 0, -1
        _nLines = _nLines + 1

    next j

    del _nLines
    add2 0, -_nLines

next i

so in short
renoStatus = ""
_r = APPLICATION_QUERY ("OwnCustomParameters", "GetParameter(Renovation.RenovationStatus)", renoStatus)

text2 0, 0, renoStatus

Cheers
Thx.
With my very tiny GDL skills I cad get the code to display reonvation status with the renoStatus parameter. How can I connect an IF THEN ELSE to use the status? IF renoStatus = "New" THEN....circle 0,0,1 ELSE IF...etc
AC 24 SWE Full
HPZbook 32GB i7 7820HQ 2,9 GHz
Quadro M2200 2GB

Dominic Wyss
Booster
Yes. exactly like that


renoStatus = ""
_r = APPLICATION_QUERY ("OwnCustomParameters", "GetParameter(Renovation.RenovationStatus)", renoStatus)

if renoStatus = "New" then !! <- String is localized. So in your case it should be "Ny"
    !do something

else
    !some code

endif

Important: the returned string is localized. So in your case it should be "Ny"
AC23 CHE - macOS Catalina

Braza
Newcomer
Thanks Dominic! Much appreciated.
And thank you Mats for posting your question.
And I agree... It would be better if the parameter was a global integer.
Though I think the whole Renovation Status should be incorporated to the Properties.
And finally, introducing the Model Filter View Option.
Cheers,
Paulo Henrique Santos, Architect
AC24_INT#3008 / I7 / 16Gb / 512Mb SSD / Windows 10

Mats_Knutsson
Advocate
Dominic wrote:
Yes. exactly like that


renoStatus = ""
_r = APPLICATION_QUERY ("OwnCustomParameters", "GetParameter(Renovation.RenovationStatus)", renoStatus)

if renoStatus = "New" then !! <- String is localized. So in your case it should be "Ny"
    !do something

else
    !some code

endif

Important: the returned string is localized. So in your case it should be "Ny"
Many thanks Dominic!
I got it to work . Now I need to get the symbols from our landscapers and start coding.
Mats
AC 24 SWE Full
HPZbook 32GB i7 7820HQ 2,9 GHz
Quadro M2200 2GB

Mats_Knutsson
Advocate
Braza wrote:
Thanks Dominic! Much appreciated.
And thank you Mats for posting your question.
And I agree... It would be better if the parameter was a global integer.
Though I think the whole Renovation Status should be incorporated to the Properties.
And finally, introducing the Model Filter View Option.
Cheers,
We strongly don't like the dubious interaction between Renovation filters, MVO and GO. Polish parliament kind of.
AC 24 SWE Full
HPZbook 32GB i7 7820HQ 2,9 GHz
Quadro M2200 2GB

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!