How to find the correct value? In all examples I have found it is hard coded. In my cases it is sometimes 6 or 7 (based on log output). What is meaning of this number?
Ok. is lcid a user input or it is a number that exists in the db? If this is a user input, why this code works for "6" but not for "10"? If it is a number that exists in db, how to find the correct value?:
db_drop_res_index( )
INTEGER res_create_demo_lcid
res_db_create_loadcase_c( "rms_1s", 1, "Assign Results To A Load Case", res_create_demo_lcid )
I only answered the second question you had which was how to get the existing lcid. The lcid is created (returned in a function argument) when the loadcase is created, so it will then exist in the database.