In ecma Scripting How do I check if the layer is empty
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
In ecma Scripting How do I check if the layer is empty
Is there any method to check if the layer contents are empty through ecma script when the layer is present.
Re: In ecma Scripting How do I check if the layer is empty
Code: Select all
var ids = doc.queryLayerEntities(layerId, true);
if (ids.length===0) {
// there are no entities in any blocks on this layer
}