[mapguide-users] Maestro Python API get color of a line in a layer definition

Jérôme Touré j.toure at global-stern.com
Thu May 21 07:20:46 PDT 2015


OK that works.
I was mistaken by the auto-completion in the IronPython Console.

I was trying to get the Color property through : 
ldf.SubLayer.GetScaleRangeAt(0).LineStyle.LineRule
As LineRule was suggested by Auto-complete, it seemed to me it was the 
correct way to get the Color property I was looking for

After changing to 
ldf.SubLayer.GetScaleRangeAt(0).LineStyle.GetRuleAt(0).Items[0].Color it 
worked liked a charm.
I should have thought that LineRule was not correct as I can have 
several ones in a LineStyle.

Thanks again Jackie for the time you dedicate to MGOS users and the good 
work you do.


Le 21/05/2015 11:10, Jackie Ng a écrit :
> Are you stuck at the line rule and don't know what property to go down to get
> to the symbolization settings? If so, you want to look at the Items property
> of the line rule which is a collection of strokes, each stroke contains the
> symbolization settings you're after.
>
> FYI. If the IronPython auto-complete doesn't help, you can always use help()
> on any variable to dump out all the properties and methods of that variable
> (along with any API documentation attached)
>
> - Jackie
>
>
>
> --
> View this message in context: http://osgeo-org.1560.x6.nabble.com/Maestro-Python-API-get-color-of-a-line-in-a-layer-definition-tp5206832p5206862.html
> Sent from the MapGuide Users mailing list archive at Nabble.com.
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users

-- 
Jérôme Touré
STERN
473 route des Dolines
Villantipolis 7
06560 VALBONNE
Phone : +33 4 92 96 96 01
Mobile : +33 6 27 84 04 30
Fax : +33 4 92 96 96 02

-------------- next part --------------
A non-text attachment was scrubbed...
Name: j_toure.vcf
Type: text/x-vcard
Size: 266 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapguide-users/attachments/20150521/f5a05ea0/attachment.vcf>


More information about the mapguide-users mailing list