Ejemplo n.º 1
0
    #===========================================================================
    for keys in steelData:
        unit = ""
        if "unit" in steelData[keys]:
            unit = steelData[keys]["unit"]
        if steelData[keys]["value"] != "None":
            pass
            #print keys + " = " + str(steelData[keys]["value"]) + " " + unit
        
    """
    Next, we demonstrate the listAllProperties() method. As you might
     expect, it produces a list of all the material properties an 
     object might possess.  
    """

    propList =  library_manager.listAllProperties()
    
    """
    Of course, since this is a list, we need to traverse it in order to
     access its data.
    """
    
    numProperties = 0
    for prop in propList:
        #print prop
        numProperties += 1
    #print numProperties
    
    """
    Finally, we have listAllMaterials(), which, as you might
     expect, lists all the materials in the library_manager
Ejemplo n.º 2
0
    #  to filter these out of your results:
    #===========================================================================
    for keys in steelData:
        unit = ""
        if "unit" in steelData[keys]:
            unit = steelData[keys]["unit"]
        if steelData[keys]["value"] != "None":
            pass
            #print keys + " = " + str(steelData[keys]["value"]) + " " + unit
    """
    Next, we demonstrate the listAllProperties() method. As you might
     expect, it produces a list of all the material properties an 
     object might possess.  
    """

    propList = library_manager.listAllProperties()
    """
    Of course, since this is a list, we need to traverse it in order to
     access its data.
    """

    numProperties = 0
    for prop in propList:
        #print prop
        numProperties += 1
    #print numProperties
    """
    Finally, we have listAllMaterials(), which, as you might
     expect, lists all the materials in the library_manager
     by name. 
    """