AutoCAD Map 3D General

Reply
Distinguished Mentor
Posts: 628
Registered: ‎01-20-2008
Message 1 of 7 (311 Views)
Accepted Solution

Adding Text in a Map3D Expression

311 Views, 6 Replies
11-19-2013 03:59 AM

I'm playing around with the FEMA NFHL Database and have some text set up to provide the Flood Zone of the Polygon as shown below.

 

Flood_Zone_Text.png

 

 

Now as you can see I'm getting an invalid expression, when I go to add the word Zone to the front of the data. Is there a way to do this?

C3D12-13
Win7x64 6gb
*Expert Elite*
Murph
Posts: 1,869
Registered: ‎11-13-2006
Message 2 of 7 (306 Views)

Re: Adding Text in a Map3D Expression

11-19-2013 04:16 AM in reply to: rl_jackson

Try this

Concat ('Zone',  FLD_ZONE) 

Murph
Supportting the troops daily.
Distinguished Mentor
Posts: 628
Registered: ‎01-20-2008
Message 3 of 7 (295 Views)

Re: Adding Text in a Map3D Expression

11-19-2013 05:59 AM in reply to: Murph

Thanks Murph,

 

Is there a way to do this?

 

I can definitely see I'm going to need a book or something for this - Anything you'd recomment?

 

Flood_Zone_Text2.png

C3D12-13
Win7x64 6gb
*Expert Elite*
Murph
Posts: 1,869
Registered: ‎11-13-2006
Message 4 of 7 (271 Views)

Re: Adding Text in a Map3D Expression

11-19-2013 03:44 PM in reply to: rl_jackson

something like

CONCAT(First_Name, ‘ ‘Last_Name,’\P’ ‘Address: ‘, Street_number, ‘ ‘, Street_name, ‘ ‘, Suffix)

This example produces a label like this:

John Smith

Address: 123 Maple Street

 

 

Try the help button and the getting Started at the bottom of the dialog for a few examples.

 

Murph
Supportting the troops daily.
Valued Mentor
Posts: 376
Registered: ‎03-24-2004
Message 5 of 7 (265 Views)

Re: Adding Text in a Map3D Expression

11-19-2013 05:06 PM in reply to: Murph

Or this

 

 ( Concat ( 'Cut Area No. ',  CutAreaNo, '\P' ,(Concat ( 'Harvest Year is ' ,Year ))))

 

to get this

 

Cut Area No. 2

Harvest Year is 2013

 

'    ' surround strings, add spaces here for neatness and readibility

 

Parenthesis work by the general rules of algebra, must have open and close pairs

 

commas seperate items

 

Dave

Active Contributor
Posts: 33
Registered: ‎10-23-2006
Message 6 of 7 (213 Views)

Re: Adding Text in a Map3D Expression

11-25-2013 08:28 AM in reply to: parkr4st
I'm using this expression to get the owner name, mailing address and parcel number based on the fields from our GIS data. CONCAT ( Owner_Name , '\P', Owne_Name_ , '\P', Mailing_Ad , '\P', Mailing__1 , '\P', Mailing_CS , '\P', PARCELNO ) The problem I am having is that some of the parcels don't have 2 names for the owner or 2 lines of address before the city state and zip, but some of them do. Example of what I get if there is no data available in one of the columns in the table GERONIMO PROPERTIES LLC---------------------------Owner_Name Owne_Name_ 215 FIRST ST N STE 200 Mailing_Ad Mailing__1 WINTER HAVEN, FL 33881 Mailing_CS S14342810000E00010 PARCELNO Example of what I get if there is data available in all of the columns in the table. SPRINT-FLORIDA INC--------------------------------------Owner_Name SPRINT CORPORATION Owne_Name_ PROPERTY TAX DEPT Mailing_Ad P O BOX 7909 Mailing__1 OVERLAND PARK, KS 66207-0909 Mailing_CS C233428A0000610000 PARCELNO Is there anyway to do some sort of "IF" statement, that will ignore what is being asked for if the data tables column is empty? Basically, I'm trying to have blank lines. Thanks, Doug
Distinguished Mentor
Posts: 729
Registered: ‎07-30-2008
Message 7 of 7 (159 Views)

Re: Adding Text in a Map3D Expression

12-01-2013 03:49 PM in reply to: dnietubicz

I use this for returning an empty string to a label if a street name in our road table (layer) is named 023.

 

 If ( ' Street LIKE ''023'' ' , ' ',  Street  )

 

The if statement requires a string for the first parameter (go figure), so any true/false evaluation statement must have single quotes around it to get the if statement to work.

In the above example, Street is a text property of the road table (layer), Like is the comparison operator, 023 is the text to compare against.Then there is two single quotes, with a space between them, after the first comma to return an empty string (actually a single space) if the Street name is like 023. Finally there is Street after the second comma, which returns the text property Street if Street is not like 023.

 

Note the 023 is surrounded by two single quotes. This is what I have worked out is requred to get text to be evaluated within single quotes.

 

So for you try this.

 

your expression

 

CONCAT ( Owner_Name , '\P', Owne_Name_ , '\P', Mailing_Ad , '\P', Mailing__1 , '\P', Mailing_CS , '\P', PARCELNO )

 

Give this a try

 

CONCAT ( Owner_Name , '\P', If ( ' Not Owne_Name_ = '''' ', CONCAT ( Owne_Name_ , '\P'), ' ' ), Mailing_Ad , '\P', Mailing__1 , '\P', Mailing_CS , '\P', PARCELNO )

 

This should return the second owners name and a carriage return if the second owners name has a value otherwise it should return a space.

 

If this fixed your issue, click on "Accept as Solution"

Andrew Puller
Maitland, NSW, Australia
Windows 7 Enterprise 64bit
Intel core i7 2600 @ 3.40 GHz with 16GB Ram
Civil 3d 2013 64bit

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you interested in helping shape the Autodesk Community?
We’re looking at a few different ways to improve the “All Forums” landing page and need your feedback! If interested, please take a few minutes to fill out the following Usability Study. Thank you for your time!

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community