BMat ID parameter

This topic contains 2 replies, has 2 voices, and was last updated by  Bruce Walker 5 months, 2 weeks ago.

  • Author
    Posts
  • #3858

    Bruce Walker
    Participant

    I’m trying to fill a Text parameter with the BMat ID of the selected building material, but for some reason it just fills it with a blank.

    Parameters: object_mat (type Building Material), list_mat_id (type Text)
    Script (in Master script):

    
    	n = REQUEST{2} ("Building_Material_info", object_mat, "gs_bmat_id", matId)
    	PARAMETERS list_mat_id = matId

    The material id is properly retrieved (I’ve checked with a print statement), but the list_mat_id stays blank. If I replace the matId with any string (e.g. “Testing”) then it works fine…so I know the commands are correct. But for some reason, it just won’t fill with a BMat ID.

    What am I missing?

    www.brucepwalker.com
    https://www.mindmeister.com/65450406

    AC20 6005 AUS Full & AC 21 3009 NZE Full | Win 10 Pro 64 | Intel i7-7700HQ 2.80GHz | 16 Gb RAM
    NVIDIA GeForce GTX 1060 8Mb

  • #3859

    Gergely Fehér
    Keymaster

    n = REQUEST{2} ("Building_Material_info", name_or_index, param_name, value_or_values)

    Returns information in the given variable(s) on a parameter of the specified building material. Expression returns 0 and contains dummy return values (emtpy string or 0) if used in parameter script, causing additional warning.

    Gergely Fehér
    Team Leader, Library Team
    GRAPHISOFT SE

  • #3860

    Bruce Walker
    Participant

    Thanks Gergely – it’s because I’m trying to use it in a parameter script. Didn’t get an error because I was doing it in the master script, so thought I’d managed to get around it. But no.

    I am trying to do this so I can list the BMat ID of the object in a schedule. How would I go about this otherwise?

    www.brucepwalker.com
    https://www.mindmeister.com/65450406

    AC20 6005 AUS Full & AC 21 3009 NZE Full | Win 10 Pro 64 | Intel i7-7700HQ 2.80GHz | 16 Gb RAM
    NVIDIA GeForce GTX 1060 8Mb

You must be logged in to reply to this topic.