I'm developing a script in order to get infro about the global position of a block in the draw but if I call the getOrigin() method I always obtain for all of them RVector(0, 0, 0, true).
Code: Select all
var doc = new RDocument(new RMemoryStorage(), new RSpatialIndexNavel());
.....
var idblock = doc.queryAllBlocks();
for (var i=0;i<idblock.length;i++) {
var obj = doc.queryBlock(idblock[i]);
print (idblock[i]+"-"+obj.getName()+"-"+obj.getOrigin());
}
If I select the block inside QCAD ide I have obtained the global position that is what I need to obtain with my code
Santi Perez
[email protected]