I always end up with duplicates of the variable pp in the list pplist.ppli because python just stores references of variables. See below for code snippet. i can't figure out how to store the value of pp into the list pplist.ppli.
import XYZ
paths = [500,1000,2000,3000,4000,5000,6000,7000,8000]
seeds = [1,125000,250000,375000,500000,625000,750000,875000,1000000]
pplist = XYZ.get_pplist({"expression":"name = Standard"})
for seed in seeds:
for path in paths:
pp = pplist.ppli[0]
rule = [r for r in pp.someList if r.product_Code == "TEXT"]
rule[0].Parameters["Seed"].nonTabularValue = seed
rule[0].Parameters["Paths"].nonTabularValue = path
pp.someList.insert(0,rule[0])
pp.name = "Seed"+str(seed)+"Paths"+str(path)
pplist.ppli.append(pp)
XYZ.set_pplist(pplist)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.