Page 1 of 1

Convert Entities

Posted: Tue Apr 03, 2018 3:12 pm
by dobidobido
Hey, im bit new to QCad, i want to ask a question about scripting,

lets assume i have variable 'a' equals to,

RTextEntityPointer(0x9fd04370)
RBlockReferenceEntityPointer(0xbf6b6d70)
RLineEntityPointer(0xbf832ce0)
RCircleEntityPointer(0xa056dfc0)

firslty i need to group entity types as line,text ,circle and block. I tried to use indexOf() to differ these entity types. However it couldnt work.
Also i need to get text information for TextEntity, block name for block and start/end points for line entity. I used a.getPosition(); but it doesnt work for line entities neither a.getText(); for text entites.

How can i differ entites and how can i convert entites into readable format by scripting?
Thanks