Hi Peter,
No, I had allready tested these alternatives
I tried again and I get this messaghe error: "Unable to create style from specified MapBasic clause"
Also I tried
lo_CompositeStyle = lo_StyleFactory.FromMBString("(35,16711680,5,""MapInfo Symbols"",0,0)")
and
lo_CompositeStyle = lo_StyleFactory.FromMBString("35,16711680,5,""MapInfo Symbols"",0,0")
and
lo_CompositeStyle = lo_StyleFactory.FromMBString("44, 16711680, 16")
and
lo_CompositeStyle = lo_StyleFactory.FromMBString("(44, 16711680, 16)")
but I get the same message error
In MapXtreme documentation is no possible to find any example
Thank you
------------------------------
Alejandro Hernandez
Information Technology & Services
ITS SA (GBD)
Buenos Aires
------------------------------
Original Message:
Sent: 01-20-2020 03:05
From: Peter Horsbøll Møller
Subject: Problem using StyleFactory.FromMBString method
Hi Alejandro,
I don't think you can include MapBasic constants inside a string when parsing the symbol style.
Try this:
lo_CompositeStyle = lo_StyleFactory.FromMBString("MakeSymbol (44, 16711680, 16)")
I have replaced RED with the color code for RED.
For the second example, you need quotes around the font name:
lo_CompositeStyle = lo_StyleFactory.FromMBString("MakeFontSymbol (35,16711680,5,""MapInfo Symbols"",0,0)")
Let me know how this works for you
------------------------------
Peter Horsbøll Møller
Distinguished Engineer
Pitney Bowes Software & Data
Original Message:
Sent: 01-19-2020 13:53
From: Alejandro Hernandez
Subject: Problem using StyleFactory.FromMBString method
Hi,
Please, someone can help me with this issue?
Thank you!
------------------------------
Alejandro Hernandez
Information Technology & Services
ITS SA (GBD)
Buenos Aires
Original Message:
Sent: 01-16-2020 08:32
From: Alejandro Hernandez
Subject: Problem using StyleFactory.FromMBString method
Hi,!
Please, can tell me why the FromMBString method give me an error?
We are using MapxTreme 8.1 for Desktop applications with VB.Net 2015
Dim lo_StyleFactory As New MapInfo.Styles.StyleFactory
Dim lo_CompositeStyle As New MapInfo.Styles.CompositeStyle()
lo_CompositeStyle = lo_StyleFactory.FromMBString("MakeSymbol (44, RED, 16)")
or
lo_CompositeStyle = lo_StyleFactory.FromMBString("MakeFontSymbol (35,16711680,5,MapInfo Symbols,0,0)")
in both case the program fails.
I can't find any excample on Web and documentatipon
Thank you!
------------------------------
Alejandro Hernandez
Information Technology & Services
ITS SA (GBD)
Buenos Aires
------------------------------