Labelling with an expression, problems!

147 views
Skip to first unread message

Richard Hill

unread,
Aug 1, 2013, 10:47:43 PM8/1/13
to mapi...@googlegroups.com
Hello Folks,
I am trying to label drillsites with down-hole geology using an expression. There are up to 10 separate down-hole units. I have used the following expression in previous versions of Mapinfo and it worked just fine but it doesn't seem to want to work in the latest version- it cuts off the units after about 3 or 4 units, and sometimes part way through the text for one unit. Anyone know if there is a limit to the length or number of characters allowed in labels in the new version?

DHNAME+CHR$(13)+UNIT1+CHR$(13)+UNIT2+CHR$(13)+UNIT3+CHR$(13)+UNIT4+CHR$(13)+UNIT5+CHR$(13)+UNIT6+CHR$(13)+UNIT7+CHR$(13)+UNIT8+CHR$(13)+UNIT9+CHR$(13)+UNIT10

Thanks,

Robert Crossley

unread,
Aug 2, 2013, 1:16:59 AM8/2/13
to mapi...@googlegroups.com

I think I did run into an issue recently that suggested that the label expression might have been truncated.

 

R

--
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en
 
---
You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapinfo-l+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Data Directions

unread,
Aug 2, 2013, 1:27:28 AM8/2/13
to mapi...@googlegroups.com

Richard,

 

Maybe try using the Format$() expression?

 

So your string would become DHNAME + CHR$(13) + FORMAT$(UNIT1, #.##) …. Etc

 

Where #.## will show the units to two decimal places.

 

Regards,

 

Bill

 

From: mapi...@googlegroups.com [mailto:mapi...@googlegroups.com] On Behalf Of Richard Hill
Sent: Friday, 2 August 2013 10:48 AM
To: mapi...@googlegroups.com
Subject: [MI-L] Labelling with an expression, problems!

 

Hello Folks,

--

Robert Crossley

unread,
Aug 2, 2013, 1:51:26 AM8/2/13
to mapi...@googlegroups.com

Richard,

 

Is the issue with the length of the label generated by the label expression, or with the length of the expression string used to specify the label?

 

Rob.

Eric Blasenheim

unread,
Aug 2, 2013, 7:14:37 AM8/2/13
to mapi...@googlegroups.com
Richard,
When you say the latest version, are you saying this worked in V 11.5 but does not work in 12? If so you should contact support.  There are limits for both the expression length and the ultimate string length. I forget exactly what they are but this expression does not look like it would hit that.  What would a typical result look like?
 
Eric Blasenheim
Pitney Bowes Software

Mats Elfström

unread,
Aug 2, 2013, 8:03:38 AM8/2/13
to mapi...@googlegroups.com
Hi Richard!
If the problem is the length of the expression, try shortening it by using a DEFINE for the newline. I tend to use chr$(10) but that may be a matter of taste.
So,
DEFINE NL Chr$(10)
would shorten your string to
DHNAME+NL+UNIT1+NL+UNIT2+NL+UNIT3+NL+UNIT4+NL+UNIT5+NL+UNIT6+NL+UNIT7+NL+UNIT8+NL+UNIT9+NL+UNIT10

Regards, Mats.E


2013/8/2 Richard Hill <hotm...@gmail.com>
--
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en
 
---
You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapinfo-l+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
______________________________________________
Mats Elfström, Väpplingvägen 21, SE-227 38 LUND, Sweden
tel: +46 46 145959 / mob: +46 70 595 39 35
alt e-mail: mats.e...@telia.com

Bill Thoen

unread,
Aug 2, 2013, 8:37:59 AM8/2/13
to mapi...@googlegroups.com
In 7.8 I managed to get 9 chr$(10)'s before it cut off on me. I was using short labels and it was pretty consistent about 9.

Bill Thoen
GISnet

--

smart...@gmail.com

unread,
Aug 2, 2013, 9:27:37 AM8/2/13
to mapi...@googlegroups.com
I'm not at work to try this, but, depending on where the truncation is happening, here's a possible work-around: 

You could add an expression column to your table, to contain that long expression with all the CHR$(13)s.  Call the expression, say, "LabelWith".  Then in the layer properties dialog, you could choose LabelWith from the list of column names.  

Of course that would make the rows in a Browser window very tall, but you could use Pick Fields to hide the column from a Browser. 


On Thursday, August 1, 2013 10:47:43 PM UTC-4, Richard Hill wrote:
Reply all
Reply to author
Forward
0 new messages