SetAnnotationPropertyValue

Discussions about annotation support.
Post Reply
win568
Posts: 44
Joined: Tue Mar 24, 2015 1:00 pm

SetAnnotationPropertyValue

Post by win568 » Wed Mar 25, 2015 11:47 am

Hi

We are using Delphi and the GDPicture_NET_11_TLB. To Change the Properties of Annotations we are using SetAnnotationPropertyValue. This method Needs a String Parmeter to set the Property Value. Where did we get the possible Parameters ?? The best way would be a Method where we get the String Parameter, if you Change the Name in future Versions.

win568
Posts: 44
Joined: Tue Mar 24, 2015 1:00 pm

Re: SetAnnotationPropertyValue

Post by win568 » Tue Mar 31, 2015 2:29 pm

I uses the same String Names as the FunctionNames are declared in the .net Namespace. A view Functions work, but not all. For example when i want to set the Borderwidth at runtime and i use the function with the Name "BorderWidth", the Annotation will not be changed.

Can you give me a list of all Names ??

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: SetAnnotationPropertyValue

Post by Loïc » Tue Mar 31, 2015 6:38 pm

Hello,

The properties names are listed in the documentation of each annotation.
Could you share a code snippet that demonstrates how you are trying to change the value?

Kind regards,

Loïc

win568
Posts: 44
Joined: Tue Mar 24, 2015 1:00 pm

Re: SetAnnotationPropertyValue

Post by win568 » Wed Apr 01, 2015 8:22 am

Hi

This are extracts from a longer block:

To Change the Border Color we use:

lName := 'StrokeColor';
lValue := ExtractARGBI(BorderColor);
GetAnnotationManager.SetAnnotationPropertyValue(SelectedIdx, lName, lValue)

-> This works fine.

But when we tried to Change the Border Width:

lName := 'BorderWidth';
lValue := ExtractInch(BorderWidth);
GetAnnotationManager.SetAnnotationPropertyValue(SelectedIdx, lName, lValue)

This does not work. When i add a new Annotation with the new Stroke width, than the extracted Inch Value works.

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: SetAnnotationPropertyValue

Post by Loïc » Wed Apr 01, 2015 12:34 pm

The returned value of ExtractInch must be Single, is it the case?

win568
Posts: 44
Joined: Tue Mar 24, 2015 1:00 pm

Re: SetAnnotationPropertyValue

Post by win568 » Wed Apr 01, 2015 1:21 pm

Hi

Yes, for These i use a Single Value. A few Functions like StrokColor work, other not. So, can you send me the Names I Need to set ??

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: SetAnnotationPropertyValue

Post by Loïc » Wed Apr 01, 2015 1:32 pm

Yes, for These i use a Single Value
So I will need a code snippet that I can us "as is" reproducing the problem. I can't guess what is wrong from your code with such few information.
So, can you send me the Names I Need to set ??
Again all is in the documentation. An example, for the rectangle annotation: https://www.gdpicture.com/guides/gdpicture/web ... mbers.html

Names are listed in the column "Name".

Kind regards,

Loïc

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: SetAnnotationPropertyValue

Post by Loïc » Wed Apr 01, 2015 1:46 pm

OK I've made further tests and it seems that Delphi is sending the parameter as double value instead of Single.
I am quite sure there is a way to handle that in the delphi side but to make things easier we will apply the proper cast from the GdPicture side.
The next minor release will include the patch.

Kind regards,

Loïc

win568
Posts: 44
Joined: Tue Mar 24, 2015 1:00 pm

Re: SetAnnotationPropertyValue

Post by win568 » Thu Apr 02, 2015 1:28 pm

Hi

Great News. Waiting for the new minor release :).

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest