[mapguide-users] IronPython - automate Maestro
Bart Oostdam
bart at giskit.nl
Fri Jul 26 07:07:27 PDT 2024
Hello Jackie,
I was successful up to a point.
I created an array and was able to add PointFilters that way with LegenLabels.
That is great.
Then I tried the same approach with CompositeFilters.
I understand they are morere complex (composite).
I did look at the XML.
A year ago I made vector symbols and was able to edit the XML of the CompositeFilter to make it point to the vector-symbols.
That worked.
Nu now I tried to add a composite filter through python I get:
[cid:image001.png at 01DADF75.E8E413C0]
Met vriendelijke groet,
GISkit BV
Bart Oostdam
Van: mapguide-users <mapguide-users-bounces at lists.osgeo.org> Namens Jackie Ng via mapguide-users
Verzonden: donderdag 25 juli 2024 17:18
Aan: MapGuide Users Mail List <mapguide-users at lists.osgeo.org>
CC: Jackie Ng <jumpinjackie at gmail.com>
Onderwerp: Re: [mapguide-users] IronPython - automate Maestro
The error in your screenshot is because you did not fully copy my suggested fragment completely.
This line here:
#Add the new pointStyle to the vectorScaleRange
vectorScaleRange.PointStyle.AddPointStyle(pointStyle)
I already said there is no point style to add (because there's only one or no point style) so there is no AddPointStyle() function to call.
Just assign pointStyle straight to the .PointStyle property.
#Add the new pointStyle to the vectorScaleRange
vectorScaleRange.PointStyle = pointStyle
- Jackie
You wrote:
Hello Jackie,
I am really sorry but things elude me or (and I think that is the case) it just doesn’t work correctly.
I load my code with ‘Run File’ and start with the defined function test() for conveniance.
I made all the variables global just in case.
I am posting my Full test-code:
The screen-shot shows that there is a Pointstyle (console: print statements to console).
1. The “IF’ doesn’t work.
2. I still don’t understand why there is a ‘NoneType’ error. I assume that there is always a ‘default’ vectorScaleRange. The print statements show there is one?
3. The poitnStyle itself seams to be created/defined as well. The print statements show this as well I think.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapguide-users/attachments/20240726/013635de/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 9747 bytes
Desc: image001.png
URL: <http://lists.osgeo.org/pipermail/mapguide-users/attachments/20240726/013635de/attachment.png>
More information about the mapguide-users
mailing list