PDA

View Full Version : using part of description for point label style?



gleiper
2010-02-19, 07:59 PM
Does anybody know of a way to create a point label style based on just one part of a point description?
For example, our description for a tree is "V-DEC 24".
I just want the "24" part of the description in my label style?
Any ideas on how to acomplish this?
Thanks.

brian.hailey933139
2010-02-20, 04:18 PM
A couple different options. You could create a user defined property for that part of the description. You could also use your description keys to convert the raw description of "V-DEC 24" to a full description of "24" and then in the label style use the full description.

gleiper
2010-02-24, 09:45 PM
Thanks for the response Brian. I'm not familiar with creating user defined properties. I will go through the help menus to try and figure that out. I looked into changing the description keys to convert the raw description into the full description but I can't figure out where to do that. Can you point me in the right direction?
Thanks.

sinc
2010-02-24, 10:38 PM
If you use a Description Format that looks like this:

$+

Then you'll get what you want in your Full Description. That code says to "Use everything except for the first parameter." In Desc Keys, "parameters" are space-delimited strings. So if your Raw Desc looks like this:

V-DEC 24

you have two parameters; the first is "V-DEC" and the second is "24". And actually, parameters count up from 0, so "V-DEC" is considered to be Parameter 0, and the "24" is Parameter 1.

A description format like this:

$*

will be replaced with all of the parameters - in effect, it's a pass-through, and says "Use the entire Raw Desc".

You can also grab specific parameters using $0, $1, $2, $3, $4, $5, etc.

So for example, assume we have this Raw Desc:

a b c d e

All other text in the Desc Format gets passed through unchanged. So here's what we'd get for various Desc Formats (first line is the Desc Format, and the second line is the resulting Full Desc):

$*
a b c d e

$+
b c d e

$0
a

$1
b

$2 $3
c d

TREE $*
TREE a b c d e

TREE $+
TREE b c d e

TREE $2
TREE c

$3 TREE $1
d TREE b

gleiper
2010-02-24, 11:57 PM
That works perefectly. Thanks for the tips sync

brian.hailey933139
2010-02-25, 03:44 AM
I don't have C3D on this computer but I thought $0 was the first parameter and $1 was the second. In your tree example:
TREE $0
TREE a

TREE $1
TREE b

I'll double check when I can.

sinc
2010-03-04, 12:22 AM
Oops, yeah, that was an error. I was typing all this from memory, too, and wasn't checking it in C3D as I typed.

I went back and fixed the post, so it should be correct now.

L3GO
2014-04-21, 07:32 AM
If you use a Description Format that looks like this:

$+

Then you'll get what you want in your Full Description. That code says to "Use everything except for the first parameter." In Desc Keys, "parameters" are space-delimited strings. So if your Raw Desc looks like this:

V-DEC 24

you have two parameters; the first is "V-DEC" and the second is "24". And actually, parameters count up from 0, so "V-DEC" is considered to be Parameter 0, and the "24" is Parameter 1.

A description format like this:

$*

will be replaced with all of the parameters - in effect, it's a pass-through, and says "Use the entire Raw Desc".

You can also grab specific parameters using $0, $1, $2, $3, $4, $5, etc.

So for example, assume we have this Raw Desc:

a b c d e

All other text in the Desc Format gets passed through unchanged. So here's what we'd get for various Desc Formats (first line is the Desc Format, and the second line is the resulting Full Desc):

$*
a b c d e

$+
b c d e

$0
a

$1
b

$2 $3
c d

TREE $*
TREE a b c d e

TREE $+
TREE b c d e

TREE $2
TREE c

$3 TREE $1
d TREE b
So Sinc, In case I have a raw descp as CM24, what expression would get me a full descp "24'? :?:

Opie
2014-04-21, 03:19 PM
You could have a specific Description Key with the full raw code (CM24). In your description format, you could label it how you wish.

L3GO
2014-04-22, 03:32 PM
Thanx Opie

Problem is that I have a couple of such descriptions as my raw and I thought there could be a way to drop the CM for all in the full descp. At the scale am printing the point descriptions turn out to be relatively big and make my work untidy