I am trying to create racks using code and the model is hanging repeatedly while doing it. The hardware is not an issue as I have a pretty loaded computer. Please see the code below. The length of the Global Table is 11000 rows. So essentially I am trying to create 11000 rack objects. How do I go about doing this?
int number = 11000;//gettablerows("GlobalTable1"); int numBays = 2; int numLevels = 5; double bayWidth =48; double levelHeight = 6; for(int i = 1; i <= number; i++) { Object obj = createinstance(library().find("?Rack"), model()); function_s(node("/?Rack", library()), "BasicRefreshTable", obj,numLevels,numBays, levelHeight,bayWidth); obj.name = "Rack" + numtostring(i); obj.location.x = gettablenum("GlobalTable1",i,2)-bayWidth; obj.location.y = gettablenum("GlobalTable1",i,3); } Object source = createinstance(library().find("?Source"),model()); source.name = "Source_1"; source.location.x = -10; source.location.y = -10; //contextdragconnection(node("MODEL:/Source_1"),model().find(gettablestr("GlobalTable1",1,1)),"A"); //contextdragconnection(node("MODEL:/Source_1"),model().find(gettablestr("GlobalTable1",2,1)),"A");