Hi, all! Take a look at the following simple script:
function ObjectInfo(){
var objs = moi.geometryDatabase.getSelectedObjects();
switch(objs.length){
case 1:
var output = "Object x length:" + objs.item(0).getBoundingBox(0).xLength + "\n";
output += "Object y length:" + objs.item(0).getBoundingBox(0).yLength + "\n";
output += "Object z length:" + objs.item(0).getBoundingBox(0).zLength + "\n";
moi.ui.alert(output);
break;
case 0:
moi.ui.alert("No object selected");
break;
default:
moi.ui.alert("More than one object selected.");
}
}
ObjectInfo();
Question: how can I display text in the command panel rather than an alert box?
Thanks!
Bryan
|