Hi Jorge,

You need to use the "current style" setting to achieve it. "Run Command" runs 
in a different "sandbox" from the apps, but the
"current" state is common to them both.

Something along these lines :
    Run Command "Set Style Pen "+sPenDefinition
    penVar = CurrentPen()

And it's always a good idea to save and restore the original state after you're 
done.

Best regards/Med venlig hilsen
Lars V. Nielsen
GisPro, Denmark
http://www.gispro.dk/

----- Original Message ----- 
From: "Jorge Gil" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, July 06, 2005 7:12 PM
Subject: MI-L Create Styles from variables


Hi listers,

I'm writing a tool that generates some thematic maps and I'm having
trouble with the restrictions of the Style statement to take variables.
Does anyone know if it's possible to use the 'Create Styles' command
specifying From and To Styles as a variable?
This is the code that I expected to work:

Dim min_style, max_style, line_styles () As Pen

'min_style and max_style can in the actual tool be changed by the user
min_style = MakePen(2,2,255)
max_style = MakePen(2,2,12345)

Create Styles
    From min_style
    To max_style
    Vary Color By "HSV"
    Number 16
    Into Variable line_styles

I tried all sorts of workarounds to define the Pen statement but nothing
works. A 'Run Command' command can't be used because the result is in
turn passed into a variable.
Any ideas?

Many thanks,
Jorge

_________________

Jorge Gil
Simulation Developer

SPACE SYNTAX




---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 17035

Reply via email to