AutoCAD Map 3D General Discussion

AutoCAD Map 3D General Discussion

Reply
Distinguished Mentor
rl_jackson
Posts: 805
Registered: ‎01-20-2008
Message 1 of 11 (510 Views)
Accepted Solution

Adding Text in a Map3D Expression

510 Views, 10 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

Try this

Concat ('Zone',  FLD_ZONE) 

*Expert Elite*
Murph
Posts: 2,028
Registered: ‎11-13-2006
Message 2 of 11 (505 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
rl_jackson
Posts: 805
Registered: ‎01-20-2008
Message 3 of 11 (494 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: 2,028
Registered: ‎11-13-2006
Message 4 of 11 (470 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
parkr4st
Posts: 456
Registered: ‎03-24-2004
Message 5 of 11 (464 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
dnietubicz
Posts: 41
Registered: ‎10-23-2006
Message 6 of 11 (412 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
andrewpuller3811
Posts: 779
Registered: ‎07-30-2008
Message 7 of 11 (358 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
Active Contributor
Civil3dMike
Posts: 27
Registered: ‎11-20-2009
Message 8 of 11 (110 Views)

Re: Adding Text in a Map3D Expression

09-09-2014 09:46 AM in reply to: Murph

Hi Murph, how would you make the expression center justified text.

My expression is: Concat (PID , '\n',  NAME_1) and it displays

45

John Doe

 

I want it to display:

    45

John Doe

 

Any help is appreciated.

Mike -

*Expert Elite*
Murph
Posts: 2,028
Registered: ‎11-13-2006
Message 9 of 11 (98 Views)

Re: Adding Text in a Map3D Expression

09-09-2014 05:07 PM in reply to: Civil3dMike

In the style label dialog there's a Horizontal Alignments button that lets you center the text.

 

lineSpacing.PNG 

Murph
Supportting the troops daily.
Active Contributor
Civil3dMike
Posts: 27
Registered: ‎11-20-2009
Message 10 of 11 (80 Views)

Re: Adding Text in a Map3D Expression

09-10-2014 06:22 AM in reply to: Murph

I am running Civil3d 2011, my style label dialog box looks different than yours and the options for justification are grayed out.

 

Image1.jpg

 

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.