Hello!
Is there a any way to write a script to compare the size of objects occurrence in model and the size of objects definition (according to active filter/template)???
I can get the size of obj occurrence values, but i don´t know how to get the objects definition size. Here the code:
var idioma=Context.getSelectedLanguage();
var modelos = new Array();
var objetos = new Array();
function main(){
var diretorios = ArisData.Unique(ArisData.getSelectedGroups());
var oOutput = Context.createOutputObject();
for(var d in diretorios){
modelos = modelos.concat(diretorios[d].ModelList(true));
if(listaPreenchida(modelos)){
for(var x in modelos){
objetos = objetos.concat(modelos[x].ObjOccList());
}
}
}
for (var i in objetos)
{
oOutput.OutputLn("\n Object: " + objetos[i].ObjDef().Name(idioma) , "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_LEFT, 0);
oOutput.OutputLn("-- Defaut symbolnum: " + objetos[i].ObjDef().getDefaultSymbolNum() , "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_LEFT, 0);
oOutput.OutputLn("\n height --- : " + objetos[i].Height(), "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_LEFT, 0);
oOutput.OutputLn("\n width --- : " + objetos[i].Width(), "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_LEFT, 0);
}
oOutput.WriteReport();
}
main();
Robert Goldenbaum on
Hi,
object definitions never have a size. Size is a property of an occurrence.
The only thing that comes to mind is to use the size for an object symbol as defined in the template. So if this model has a template set, you could try to find out if what the size of the object would be after setting the template. But as far as I know, this could only be done by setting the template to the model which would destroy the old size...
BR Robert