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
[email protected]
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

<<attachment: j_toure.vcf>>

_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users

Reply via email to