POST
|
I'm using dynamic text on a layout and need it to fit in a certain space. So I added the text box to fit that space. Problem is some owners are 2 words and some are many many more. The text box will just drop whatever doesn't fit inside the box, which I don't want to happen. Was thinking that maybe there was a simple fix like with the legend properties box that you can check to automatically resize/shrink to fit. thank you
... View more
01-10-2017
09:20 AM
|
0
|
0
|
760
|
POST
|
Just wondering about the update to 10.1, I've been looking everywhere for an answer to this. I'm still looking so maybe there is another thread with an answer that I haven't clicked on yet. And I've downloaded the easycalculate add-ins but I don't know how to fix them, or the python script to run in 10.1 Thanks to anyone who can help me out.
... View more
12-03-2014
08:59 AM
|
0
|
0
|
1803
|
POST
|
Thank you StacyRendall!!!! I was almost there, not sure what happened to the == 1 in that one block, I swear it was there before. So the trick is to make the variable and do the rounding and integer business then get the length of that instead of trying to do it on every if statement, saving all that typing in the process haha. I'm still pretty new to python, only on chapter 7 in my book and that was the first time using the .format and * so thanks for teaching me something new. I'll get it all figured out eventually. Thanks again! Now I just have to figure out how to get them perpendicular to my line. Oh, that worked if someone missed it.
... View more
08-14-2013
05:32 AM
|
0
|
0
|
475
|
POST
|
To get to the hatching you have to be using a route. The esri__measure comes from that automatically and is not a field that requires the []. To get to the hatch just go to your route properties and it will be a tab at the top. Under the Hatch Class in the box on the left there will be a Hatch Def(1) or however many you add. If you click on the Hatch Def you will have options, one of which will be to label the hatches you have set up. You can control the symbol here like normal. You can then click the label settings in the label section and click the build a text expression bubble and then click the expression button. Once you click the expression button the dialogue box looks the exactly the same except it says Hatch Text Expression at the top instead of Label Expression. This is why I assume they are the same, just in two different places. I appreciate the help with this, Thanks
... View more
08-13-2013
01:51 PM
|
0
|
0
|
904
|
POST
|
Okay, so I've tried these suggestions. I'm think the problem might be the esri__measure comes from the route and is assigned where ever the hatch mark falls or something because nothing is working here for me anyway. I tried this one.
def FindLabel ( esri__measure ):
if len(str(int( esri__measure ))) == 0:
return "0+00"
elif len(str(int( esri__measure ))) == 2:
return "0+{0}{1}".format( *esri__measure )
elif len(str(int( esri__measure ))) == 3:
return "{0}+{1}{2}".format( *esri__measure )
elif len(str(int( esri__measure ))) == 4:
return "{0}{1}+{2}{3}".format( *esri__measure )
elif len(str(int( esri__measure))) == 5:
return "{0}{1}{2}+{3}{4}".format( *esri__measure )
elif len(str(int( esri__measure ))) == 6:
return "{0}{1}{2}{3}+{4}{5}".format( *esri__measure )
It verifies, but it returns nothing. Just a blank. I also tried it without the str(int part and got the same thing. A blank when verified. The brackets are to call a field name, problem is this isn't a field name. I tried this next.
def FindLabel ( esri__measure ):
m = esri__measure
return m
And that works. Returns my station just as if I hadn't changed anything. I'm not worried about the integer anymore because my interval is set to 1000' so there is nothing on the end anyway. So with that working I'm thinking I'm on to something so I try this next.
def FindLabel ( esri__measure ):
m = esri__measure
ls = m[:-2]
rs = m[-2:]
return ls "+" rs
When I verify this it throws up the error "No features found. Could not verify expression." This is the same bit I tried out in PythonWin making m an integer and a string and it worked both times. Maybe someone sees something I'm not catching (don't know about) and can get this working for me please. By the way I'm using 10.1 Thanks again for the help here! I just tried that first code in PythonWin and changed return to print and added the else at the bottom in case it wouldn't print any of the if statements and I get nothing. No errors or anything so I'll be trying to figure that out too. Just tried this too:
def FindLabel ( esri__measure ):
rs = esri__measure[-2:]
ls = esri__measure[:-2]
return ls + "+" + rs
Same error, "No features found. Could not verify expression"
... View more
08-13-2013
08:15 AM
|
0
|
0
|
904
|
POST
|
This is driving me crazy and I'm sure its something really simple but I can't find examples to show me what to do so I'm hoping someone here can help me out. I have a route with measures that I'm trying to format into 123+45 I ran this in PythonWin just to make sure I had this part right: import arcpy station = "37000" rs = station[-2:] ls = station[:-2] print ls + "+" + rs it gave me this: 370+00 just what I'm trying to do. So then I go to the Hatch Text Expression dialogue and hit advanced. First thing I probably need to know is what FindLabel is doing? I looked around on the internet trying to find it and still I'm not very sure. Could be I just suck at the internet though. I'm guessing the statement def FindLabel ( esri_measure) just lists the arguments you're going to use below it. Does it make a string or is it a still a number? So far in the advanced box I can get this much to work: def FindLabel ( esri__measure 😞 return str(int(esri__measure)) and it seems to return a value with no decimals just fine. But when I start trying to add to that to get my 123+45 format it keeps giving me the error "No features found. Could not verify expression." This is going to have a lot to do with my inexperience using Python this way and my inexperience with Python in general I'm sure, but I haven't been able to find any good examples on the internet to help me puzzle this out or explain it to me. If someone could show me how to enter this into the advanced expression box or point me to some good examples so I can figure it out myself that would be great. Thanks in advance!
... View more
08-12-2013
01:32 PM
|
0
|
15
|
2081
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|