hello,
using :
Version:
3.28.2.0 (3.28.2)
using ecma script in the script shell.
i get a block attribute in a var called attribute.
i can use : attribute.getTag() or attribute.getPlainText() without issue.
i am not able to hide this attribute using : attribute.setInvisible(true)
the method attribute.isInvisible() is answering true or false but the attribute is not hidden on the drawing.
is it a bug or a wrong use ?
ecma script attribute.setInvisible() is not hidding the attribute
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.
Re: ecma script attribute.setInvisible() is not hidding the attribute
You queried an entity from the document, regard it as a clone, and altered some properties.
The properties of the document entity are not affected.
You need to recast that entity back to the document.
Regards,
CVH
The properties of the document entity are not affected.
You need to recast that entity back to the document.
Regards,
CVH
Re: ecma script attribute.setInvisible() is not hidding the attribute
do you have any example on how to do it please ?
Re: ecma script attribute.setInvisible() is not hidding the attribute
You might want to search the forums on the term "RModifyObjectsOperation" for code snippets.
I would step away from the Script Shell at some point and implement Addons.
All QCAD tools are implemented as Addons in ECMAScript, for open source see:
https://github.com/qcad/qcad/tree/master/scripts
Full class descriptions:
https://qcad.org/doc/qcad/3.0/developer/modules.html
Regards,
CVH
I would step away from the Script Shell at some point and implement Addons.
All QCAD tools are implemented as Addons in ECMAScript, for open source see:
https://github.com/qcad/qcad/tree/master/scripts
Full class descriptions:
https://qcad.org/doc/qcad/3.0/developer/modules.html
Regards,
CVH