Hi, I want to set current day (in day name) for if condition. Is it possible to trace the day name instead of number of days? Note: my simulation time unit is day
Thanks
Hi @Anggoro P
You can capture it using the below code.
string strCurDay = getmodelunit(CURRENT_TIME_STR); string Curday = strCurDay.substr(13,3);
Thanks.
There isn't currently a way to get the name of the current day directly, but you can use the getmodelunit() command to get the day of the week, then set the name based upon that. Create a user command to make it easy to call.
string today = getCurrentDay(); //getCurrentDay Code int day = getmodelunit(CURRENT_DAY_OF_WEEK); Array names = ["Sun", "Mon", "Tue", "Wed", "Thur", "Fri", "Sat"]; return names[day + 1];
8 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved