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

using Conditional expression in calculate to create new property???

8 REPLIES 8
Reply
Message 1 of 9
ouspensky
845 Views, 8 Replies

using Conditional expression in calculate to create new property???

Hi I want to do something similar to a LOOKUP or Reclassify. I have an autoCAD file of road centerlines I have exported to SDF with three different colors 10,162, and 256.  Now what I want to do is use the CALCULATE function to add a new property to the attribute table called "type"

 

IF COLOR =10 THEN 'Arterial'

IF COLOR =162 THEN 'SubArterial'

IF COLOR =256 THEN 'Local'

 

in QGIS I would write the following SQL: CASE( WHEN "COLOR" = 10 Then 'Arterial'....

 

how to do a similar reclass in MAP3D???

8 REPLIES 8
Message 2 of 9
hence_the_name
in reply to: ouspensky

Hi,

 

as far as I know that is not possible with Map (unfortunately).

 

One workaround might be:

- export to SQLite instead of SDF

- use SQLite tools to create new column and then update column using SQL

 

Rob

http://raumpatrouille3d.blogspot.ch/
Message 3 of 9
Gary_Braun
in reply to: ouspensky

Why not just create a new SDF file with this information in it? Put all of you Color 10 lines on an "Arterial" layer, Color 162 on a "Secondary Arterial" layer, etc, then rebuild the SDF add the layer name when exporting.

 

I know it doesn't directly answer your question about using lookups, but it is an easy fix for your immediate problem.

Message 4 of 9
jackmelgers
in reply to: ouspensky

Hello,

 

I would suggest the following approach.

 

1. Create a new SqLite file (in AutoCAD Map) with just FeatID and two atribute fields and without geometry field.

 

2. Open the SqLite file in an external browser and fill in the data.

 

   Field 1 Field2

   10       Arterial

   162     Sub-arterial

   256     Local

   etc.

 

3. Back in AutoCAD Map, create a JOIN between the original SDF file and the new SqLite file using Field1.

 

This way, the SqLite is used as a 'lookup' file. It requieres a few steps, but works fine !

 

Greetings, Jack Melgers

 

 

Message 5 of 9
parkr4st
in reply to: jackmelgers

What do you need to with the three designations after the data is in the table?

 

 

Message 6 of 9
jackmelgers
in reply to: parkr4st

Hello parkr4st, 

 

The auxiliar file (for instance in SqLite) is just to create a 'lookup' table (10 >> Arterial).

After creating the JOIN you can use the new field to create map labels (Arterial, Sub-Arterial, etc) or a thematic map. 

 

I don´t think it´s possible in AutoCAD Map to do this in just one step by creating a calculated field.

 

Greetings, Jack Melgers

Message 7 of 9
parkr4st
in reply to: jackmelgers

you can do that with style without the extra column of data.

 

theme on you color field, reset the line colors to the three numbers you use and width or a particular line style as you chose, the legend label for each class of road, Feature label to each type of road.  You can adjust various settings to get the final appearance you desire within the limits of the selections available with Map3D

 

Dave

Message 8 of 9
jackmelgers
in reply to: parkr4st

OK, parkr4st, that´s right !

 

Anyway, the original question was how to create an additional column with this information. But you´re right, perhaps it´s not necessary, it depends on what the user wants to achieve. 

 

Greetins, Jack Melgers.

Message 9 of 9
kajar
in reply to: ouspensky

Hi!

During conversion from DWG->SDF you can just use "Feature Class Property  Mapping". You can create directly property field "Type" based object property "Color",  just  mark that color 10=Arterial, color 162=SubArterial and 256=Local. So you dont need to do any calculation anymore.

 

 

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

Post to forums  

Autodesk Design & Make Report

”Boost