I tried to use 'arrayr' to creat 30*30 cubiods in x-y plane using Python script.
Codes:
soil1 = g_i.cuboid(1, (0.5, 0.5, 0))g_i.arrayr(soil1, 30, (1,0,0), 30, (0,1,0))
Errors:
!!!!> arrayr (Volume_1 Volume_1.Soil) 30 (1 0 0) 30 (0 1 0)Invalid parameters. Make sure that the specified parameters match the ones that are expected.
The scripting reference only contained examples for points.
Hi Stefanos,
Thanks very much for your help.
I tried to generate a cuboid 30m*30m*15m using the 1m*1m*1m cuboid (30*30*15=13500), because I want to assign different properties for each 1m*1m*1m cuboid. I wrote a 'for loop' to generate cuboid one by one, but I found it extremely slow to generate this structure and assign properties. It took 30 mins only to generate 1000 cuboids.
Then, I tried to use 'arrayr' to do that. It is fast to generate the structure using 'arrayr', and it takes about 2mins to get the 13500 1m*1m*1m cuboids. However, to assign properties, it takes about half mins for one cuboid; it would be impossible to assign 13500 cuboids. I use 'g_i.Soils[matnum].Material.set(material)' to assign properties, this step is very slow. However, I generated another cuboid 5m*3m*2m using 30 1m*1m*1m cuboids, using the same code; assigning property is very fast, and it can be finished within 10s for 30 cuboids rather than 2mins for one cuboid. If the total number of cuboids is smaller, the required time for assigning properties to one cuboid is less.
I also encountered an GDIError when the cuboids needed to assign properties were larger than 800. I cannot go to the 'structures' step, but I can go to mesh flow conditions and staged construction. The bugreport is attached.
Thanks again for your help.
7356.bugreport.txt
Hello again,
With regard to the performance, I have created an internal report for our QA and developers to investigate. You do create a large number of objects but still, it is worth checking for any improvements we can make.
About the bug report, I can see that the following is mentioned: Vcl.Graphics. That is why you see that something goes wrong with the canvas in Input.
Can you please check for any latest updates to your graphic's card drivers? Sometimes issues about visualization get resolved like that.
If the issue persists, please submit a service request so we can follow up with you: https://apps.bentley.com/srmanager/ProductSupport