Back to SDS/2 Parametric Scripts

 

from member import Member, MemberAllocated

seqList = [3,4,5,6,7]

memDict = {}

mi = 1

while mi < MemberAllocated():

    try:

        mem = Member(mi)

        if int(mem.sequence) in seqList and mem.type == "Beam":

            if mem.piecemark not in memDict.keys():

                memDict[mem.piecemark] = [mem.sequence, 1]

            else:

                memDict[mem.piecemark] = [memDict[mem.piecemark][0], memDict[mem.piecemark][1]+1]

    except:

        pass

    mi += 1

 

memList = []

for key, item in memDict.items():

    memList.append([item[0], key, item[1]])

   

memList.sort()

 

for item in memList:

    print 'Sequence = %s  Piecemark = %s  Model Quantity = %s' % (item[0], item[1], item[2])