getPosition() for TextEntity showing 0,0,0 [SOLVED]

Discussion forum for C++ and script developers who are using the QCAD development platform or who are looking to contribute to QCAD (translations, documentation, etc).

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files, scripts and screenshots.

Post one question per topic.

Post Reply
arun
Active Member
Posts: 34
Joined: Tue May 09, 2023 9:04 am

getPosition() for TextEntity showing 0,0,0 [SOLVED]

Post by arun » Mon Dec 11, 2023 3:36 pm

Hi,
How does the getPosition() work for RTextEntity? I get the result of this as

Code: Select all

"RVector(0.000000, 0.000000, 0.000000, 1)"
. However, the Property of this entity shows different values. I have attached the screenshot for reference
Attachments
Screenshot_2023-12-11_20-00-56.png
Screenshot_2023-12-11_20-00-56.png (52.76 KiB) Viewed 2315 times
Last edited by arun on Mon Dec 11, 2023 4:03 pm, edited 1 time in total.

CVH
Premier Member
Posts: 3480
Joined: Wed Sep 27, 2017 4:17 pm

Re: getPosition() for TextEntity showing 0,0,0

Post by CVH » Mon Dec 11, 2023 3:57 pm

Try:
https://qcad.org/doc/qcad/3.0/developer ... 1a59df2703

Text position is hardly used, text is aligned to a certain point.

arun
Active Member
Posts: 34
Joined: Tue May 09, 2023 9:04 am

Re: getPosition() for TextEntity showing 0,0,0

Post by arun » Mon Dec 11, 2023 4:02 pm

Thanks a lot CVH, that was super quick and perfect.

Also, for further understanding, isn't getPosition() not to be used for Text entities? A bit confused on this method

CVH
Premier Member
Posts: 3480
Joined: Wed Sep 27, 2017 4:17 pm

Re: getPosition() for TextEntity showing 0,0,0 [SOLVED]

Post by CVH » Mon Dec 11, 2023 4:11 pm

arun wrote:
Mon Dec 11, 2023 4:02 pm
isn't getPosition() not to be used for Text entities?
Probably from before text could be aligned ... Just guessing.
Or it may have a meaning in other applications. :wink:
Won't be the sole confusing bit you might discover.

arun
Active Member
Posts: 34
Joined: Tue May 09, 2023 9:04 am

Re: getPosition() for TextEntity showing 0,0,0 [SOLVED]

Post by arun » Mon Dec 11, 2023 5:06 pm

Thanks again CVH

Post Reply

Return to “QCAD Programming, Script Programming and Contributing”