Infrastructure Map Server Forum
Welcome to Autodesk’s Infrastructure Map Server Forums. Share your knowledge, ask questions, and explore popular Infrastructure Map Server topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

driving line colour from the database

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
gluckett
1779 Views, 5 Replies

driving line colour from the database

Hi All,

I have a database full of string colours:  0xFFFF00FF etc

 

If I copy and paste this value for my Enhanced Styles it works fine for value, but if I choose the column I get Not A Number Error.  There is no TOHEX function... Sorry for the cross-post but this is a AIMS 2012 issue too

 

COLOUR_DATABASE.png

5 REPLIES 5
Message 2 of 6
gluckett
in reply to: gluckett

Solved it.  You have to store you colours from ARGB for example RED FF FF 00 00 (hex) in Long Int in the database or mapguide can't see it.

 

So just convert your data in the database to Long Int (FFFF0000) which is 4294901760  and Black is 0

 

Crazy way to do it, but there you are.

Message 3 of 6
GPT_Maria
in reply to: gluckett

Hi gluckett,

 

I had that problem, too. Fortunately I found this post. I followed your steps converting the strings to integer, but with no satisfied results. All the lines now appear in black with a slight transparency (just in MapGuide), although the alpha value in the hex-string was always "ff" (opaque). I even took your eample value which was red. In Map3D (2010) it appears in a kind of violet, in MapGuide (2010 and MG OS 2.4).

Have you made any other experiences with that issue?

 

- kind regards

Message 4 of 6
gluckett
in reply to: gluckett

yes, unfortunately...and sometimes the transparency doesn't come across either...painful little bug.  I haven't tried in AIMS 2013 and Map 3D 2013 so I may be fixed...

Message 5 of 6
GPT_Maria
in reply to: gluckett

I could find a solution:

The attribute with the color-code (in integer) in the database should be from type string. It's a bit confusing, but that's how it works.

Hope it works for you as well.

Message 6 of 6
b.banzer
in reply to: GPT_Maria

Hi,

 

I have kind of the same problem with the exception that I want to use the colors in the database for polygones.

 

Unfortunately I don't find a solution to convert the data.

 

I'm using an Oracle database and in my table I have a column for the colors of the type VARCHAR2 (10 byte).

 

Could you explain me please what I need to do, in order to be able to select the color from the database.

 

I found somewhere another solution for the problem but it does not work 100%. The colors are shown correctly on the drawing, but the colors in the legend are all balck.

 

Thanks in advance!

 

Bob

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report