Hi,I am looking for an option to create many similar phases using a single command. Can anybody help me with a Python sample code?Best
Muhammad
Hello Muhammad,
A simple example to generate 10 phases
for i in range(10): g_i.phase(g_i.Phases[-1])
You may refer to the question of create new phases in the link below:communities.bentley.com/.../592870
Thanks so much!
I am writing the following code to create 10 stages with Dynamic consolidation and a Dynamic time interval of 0.5 sec. However, after creating the stages, I am getting the Dynamic time interval as zero. Can you please help?
for _ in range(1):newphase = g_i.phase(g_i.Phases[-1])newphase.DeformCalcType = newphase.DeformCalcType.dynamicwithconsolidationnewphase.DeformTimeIntervalSeconds = newphase.DeformTimeIntervalSeconds=0.5newphase.MaxStepsStored = newphase.MaxStepsStored=10
You may consider this (in v2023.1):
for i in range(10):
g_i.phase(g_i.Phases[-1])
g_i.Phases[-1].DeformCalcType = "Dynamic with consolidation"
g_i.Phases[-1].Deform.TimeIntervalSeconds = 0.5
g_i.Phases[-1].MaxStepsStored = 10
Answer Verified By: Muhammad Abdur Rahman
Thank you so much!