WALL_​​SKINS_​​BMAT_​​NAMES

Home Forums Problems and solutions in GDL Informations from the environment WALL_​SKINS_​BMAT_​NAMES

This topic contains 6 replies, has 4 voices, and was last updated by  Gergely Fehér 3 years, 5 months ago.

  • Author
    Posts
  • #1755

    James Murray
    Participant

    What’s the correct usage of this global? I assume the content is a string, so I’m trying to assign it to a string variable like so:

    stringParam=""
    stringParam=WALL_SKINS_BMAT_NAMES[1]

    But I get a warning of ‘Incompatible Array Definitions’. I can PRINT the global’s content and it reads correctly in the report.

  • #1758

    Dominika Bobály
    Keymaster

    James,
    this global has one column and a number of rows equal to the skins number, so the form is:
    WALL_SKINS_BMAT_NAMES[nSkins][1]

    The WALL_SKINS_NUMBER global returns the filled rows number of WALL_SKINS_BMAT_NAMES, and you can use it for running the iteration.
    Try the following code (copy it to a window’s 2D script):

    text2 0, 2, "vardim1(WALL_SKINS_BMAT_NAMES) = "
    text2 7, 2, vardim1(WALL_SKINS_BMAT_NAMES)
    
    text2 0, 3, "vardim2(WALL_SKINS_BMAT_NAMES) = "
    text2 7, 3, vardim2(WALL_SKINS_BMAT_NAMES)
    
    text2 0, 4, "WALL_SKINS_NUMBER = "
    text2 7, 4, WALL_SKINS_NUMBER
    
    for ii = 1 to WALL_SKINS_NUMBER
    	text2 10, ii*1, WALL_SKINS_BMAT_NAMES[ii][1]
    next ii

    The PRINT command iterates through any array global without worrying about the array dimensions, that’s why it was working.

    Dominika Bobály
    Library Developer, Library Team
    GRAPHISOFT SE

  • #1761

    James Murray
    Participant

    Thank you!

  • #1961

    Heimo Mooslechner
    Participant

    I have some problems with this parameter and the correct usage..

    i wrote:

    OFT = WALL_SKINS_NUMBER
    i=1
    
    for ii = 1 to oft
    
             WSP[ii] = WALL_SKINS_PARAMS[ii][1]                 !Schraffur
    
             KernSTR = STR(WALL_SKINS_PARAMS[ii][6], 1,0)
             Kern = WALL_SKINS_PARAMS[ii][6]
    
                WSBN[ii]=WALL_SKINS_BMAT_NAMES[ii][1]            !Baumaterial
                add2 0.15,0.02
                   style links
    
                   t = REQUEST{2} ("Building_Material_info", WSBN[ii], "gs_bmat_surface", oberflaechen[ii])  !!S378
                   r = REQUEST ("Name_of_material", oberflaechen[ii], name[ii])
    
                del 1
    
                if ii = 1 then Aussenputz = oberflaechen[ii]
                if ii = oft then Innenputz = oberflaechen[ii]
    
             s=request("Name_of_fill",WALL_SKINS_PARAMS[ii][1],Schichtnamen[ii])
    
             !Schichtnamen[ii]=WSBN[ii]
    
             Schichtdicken[ii]=WALL_SKINS_PARAMS[ii][2]      !Dicke
    
          if KernSTR="3" then 
             WoKern = ii
             else
             Gesamtdicke = Gesamtdicke  + Schichtdicken[ss]
          endif
          
          add2 0, -0.015
          
    next ii
    
    del oft-1
    
    for ss = 1 to WoKern-1
       Dickensumme = Dickensumme + Schichtdicken[ss]
    next ss
    
    

    in the 2D-Script – i got correct answers from it.

    there i wrote:

    
    
    for ii = 1 to oft
       add2 0, 0.05
       text2 0,0,oberflaechen[ii]
       Text2 0.2,0, Aussenputz !! nur als Test - schreibt brav 18 hin
    next ii
    del oft-1
    
    

    BUT – in the 3D-Code – i got Just 0 when i tried the same – and there i would need it so badly…

    i wrote in 3D:

    
    
       DEFINE STYLE test "Arial", 10, 1, 0
       style test   
        for ii = 1 to oft
          addy -0.012
          addz 0.1
                  text 0, 0,oberflaechen[ii] - !!nur als Test - da schreibt er gar nichts hin
             TEXT 0.01, 0, Aussenputz !! sollte überall 18 stehen - aber macht im 3D  0 draus
          del 1
       next ii
       del oft
    
    

    Why is it not functional in 3D?

    I personal would need it for self made wall-openings with much more editable hotspots than are used in the normal Archicad-library.. for a much better user-experience..

    Teacher in HTL-Salzburg
    AC5-19, Win and Mac
    GDL hobby developer

  • #1968

    Gergely Fehér
    Keymaster

    WALL_SKINS_BMAT_NAMES works only in 2D. In 3D you can use WALL_MAT_A and WALL_MAT_B.

    Note: when you paste codes with loops, please use other variables than “i” or “s” as these characters with brackets will be eliminated as they are interpreted as BBCodes. I changed them in your code snippets to “ii” and “ss” for a better understanding. You can read more about BBCodes here: http://gdl.graphisoft.com/forum-functions/

    Gergely Fehér
    Team Leader, Library Team
    GRAPHISOFT SE

  • #1969

    Heimo Mooslechner
    Participant

    Thank You for Your reply. In the meantime – i figured the WALL_MAT_A and WALL_MAT_B out by myself – and took it as a workaround for the limitation of WALL_SKINS_BMAT_NAMES in3D. This should really be changed in further AC-Versions.. i think.

    And thanks for the suggestion for using “ii” instead of “i” – i will make it so in future. Do i understand it right – this BBC is limitation for this forum – not for the GDL?

    Teacher in HTL-Salzburg
    AC5-19, Win and Mac
    GDL hobby developer

    • #1970

      Gergely Fehér
      Keymaster

      Yes, this limitation with the variable names is only for this forum – in ARCHICAD you can use any variables.

      Gergely Fehér
      Team Leader, Library Team
      GRAPHISOFT SE

You must be logged in to reply to this topic.