Emre CETIN wrote:
>
> Finally I got it to work! Here it is:
>
> |importwin32com.client srf
> =win32com.client.gencache.EnsureDispatch('Surfer.Application')Plot=srf.Documents.Add(1)srf.Visible=TrueMapFrame1=Plot.Shapes.AddImageMap(GridFileName="C:/test.grd")ImageLayer1=MapFrame1.Overlays(1)ImageMap1
> = win32com.client.CastTo(ImageLayer1, "IImageLayer") # the property
> was under IImageLayer ImageMap1.ShowColorScale = True|
>

For future maintenance purposes, you might consider changing the names
to match the interfaces:

    Shape1 = MapFrame1.Overlays(1)
    ImageLayer1 = win32com.client.CastTo(Shape1, "IImageLayer" )

-- 
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.

_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32

Reply via email to