Jump to content

Guillaume H

Member
  • Posts

    1
  • Joined

  • Last visited

Posts posted by Guillaume H

  1. On 11/1/2019 at 12:27 PM, denleyandr said:

    A great help @taavilooke  Thanks for this! 
    As a total Scripting beginner it would be helpful for us to separate the Wall component from the components thickness into individual columns. I thought that duplicating the script and adjusting the 'Get' info would make sense, but I#ve reached a roadblock in my already limited knowledge that prevents me getting further. Would you have a trick here? 
     

    @Sky Change the Script Language from 'Vectorscript' to 'Python Script'.  That should solve it (assuming you haven't already made that step)


    EDIT:
    sent too quickly. The solution was easier than I thought and is here in case people are interested.

    Component:

    wallObj = vs.WSScript_GetObject()

    (a, numComp) = vs.GetNumberOfComponents(wallObj)

    comps = []

    for x in range(1, numComp+1):
        name = vs.GetComponentName(wallObj, x)
        (a, thickness) = vs.GetComponentWidth(wallObj, x)
        comp = name + " "
        comps.append(comp)

    str = "\r".join(comps)
    vs.WSScript_SetResStr(str)


    Thickness:

    wallObj = vs.WSScript_GetObject()

    (a, numComp) = vs.GetNumberOfComponents(wallObj)

    comps = []

    for x in range(1, numComp+1):
        name = vs.GetComponentName(wallObj, x)
        (a, thickness) = vs.GetComponentWidth(wallObj, x)
        comp = " " + str(thickness)
        comps.append(comp)

    str = "\r".join(comps)
    vs.WSScript_SetResStr(str)

     

     

    Hi,

    Thanks for the help ! 

    I've another request, I'm using this script but I'd like to include U value for each components, is it possible?

    Thanks

×
×
  • Create New...