Jump to content

How to request IronPython to change x and y ratios in Map Appearance property


Dmitry Surovtsev

Recommended Posts

Hi,

I am an absolute newbie in IronPython. Also, as an early FORTRAN user, Inever faced a strong need to learn any object-oriented language other than copy/pasting code snippets.

However I am now finalizing a Spotfire dashboard that requires to automate the following manual process:

1.Open Map visualization Properties window

2.Click on Appearance branch

3.Change the values for both Y and X Ratio Settings to other than default 1:1

4. Close

 

I hope these values are the x and y described athttps://docs.tibco.com/pub/doc_remote/sfire_dev/area/doc/api/TIB_sfire-analyst_api/topic=html/M_Spotfire_Dxp_Application_Visuals_Maps_MapChartTransform_FromScales.htmin Spotfire API.

I am now trying to figure out the code to change it.

I made the below attempt that seemedto be logical for me without spending time onreading IronPython basics

from Spotfire.Dxp.Application.Visuals.Maps import *

 

#v1 is defined in Script Parameters

 

map=v1.As[MapChart]()

 

map.MapChartTransform.FromScales().x = 2

map.MapChartTransform.FromScales().y = 150

but got the error message: "AttributeError: 'MapChart' object has no attribute 'MapChartTransform'"

I think I am close to the solution, but not exactly there. What would you recommend to change in mycode other than RTFM

Thanks in advance, Dmitry

 

PS: a mem, just in case "If you want users to RTFM, make better FMs"

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...