POST
|
Hello Dan, thank you for your answer. At the moment these are all just thoughts. I know the basics of network creation. What I will get is an automated output of the points (Shape). And I will get the info which points are connected and some info about the type of these connection (CSV). So I had to model this network. But I think with the given information I can achieve an automated way to do so. In an additional step I need an abstract form of the map. Like described in my post above. And this is what I don't know. If there is any better way then to do this completely by hand. A bonus would be if the abstract form could act like the original network too.
... View more
04-18-2016
11:58 PM
|
0
|
0
|
271
|
POST
|
Hello together, I would like to create a map like this http://www.vvs.de/download/SBahn_Liniennetz.pdf based on georeferenced point-layer of the stations. And I would like to accomplish that in an at least semi automated way (stations will change position, new ones added, others are deleted). Is there any solution out there for this (e.g. network analyst)? Or are all these maps drawn manually? For example a script that calculated a new layer there the stations are relocated to form such an abstracted map (python?). I am not searching for a very nice looking map but a functional one (routing still possible from calculated attribute lenght, obviously the real length is then not working ). See example png.
... View more
04-18-2016
02:23 AM
|
0
|
2
|
2900
|
POST
|
Now it works. I implemented a arcpy.RefreshActiveView() for forcing the correct width and height values. Otherwise the actual drawing of the legend comes too late. So my final question remains: The addin produces no error if I open an arcgis project with a Data Driven Page Index Layer without the attribute LegendPOS. In this case it does simply nothing. This is good, but is this normal? Do I have to implement an error behavior for doing it right? Here the code def pageIndexExtentChanged(self, new_id): mxd = arcpy.mapping.MapDocument("CURRENT") #Only one legend in layout legend = arcpy.mapping.ListLayoutElements(mxd,"LEGEND_ELEMENT")[0] #The heigt and width must be up to date arcpy.RefreshActiveView() #LegendPOS is a attribut field in the index layer (small integer) #1 = lower left, 2= upper left, 3= upper right, 4 = lower right #posX and posY hardcoded for this special layout if mxd.dataDrivenPages.pageRow.LegendPOS == 1: posX = 2 posY = 3.1 elif mxd.dataDrivenPages.pageRow.LegendPOS == 2: posX = 2 posY = 24.6 - legend.elementHeight elif mxd.dataDrivenPages.pageRow.LegendPOS == 3: posX = 19 - legend.elementWidth posY = 24.6 - legend.elementHeight elif mxd.dataDrivenPages.pageRow.LegendPOS == 4: posX = 19 - legend.elementWidth posY = 3.1 legend.elementPositionY = posY legend.elementPositionX = posX
... View more
12-09-2015
06:26 AM
|
0
|
0
|
2310
|
POST
|
If I use the python console step by step, it works.
... View more
12-09-2015
02:08 AM
|
0
|
0
|
2310
|
POST
|
I added a view Pictures. Test 1 and 2 works. If I change the layer names to the same lenght it works. Test 3 and 4. But If the names are Different it doesn't use the new width. TestERROR1 and TestERROR2
... View more
12-09-2015
01:46 AM
|
0
|
0
|
2310
|
POST
|
Unfortunately, it doesn't work correctly. The value of the size of the legend is not changing. It is always those of the original legend. Longer layer names (legend.elementWidth) More layers (legend.elementHeight)
... View more
12-09-2015
01:32 AM
|
0
|
2
|
2310
|
POST
|
Hey Darren, thanks for your answer. With your help I could make a arcgis extension add-in. Using the Python Add-In Wizard. And it works as I want (UPDATE: It does not. Working code below). In the index layer there is an attribute field which controls the position of the legend. (1 = lower left, 2= upper left, 3= upper right, 4 = lower right). The position is hardcoded to fit my layout. Here the code I use (don't know how to enable the code tag you are using ) <<<<<<<<< import arcpy import pythonaddins class ExtensionClass1(object): """Implementation for MovableLegend_addin.extension2 (Extension)""" def __init__(self): # For performance considerations, please remove all unused methods in this class. self.enabled = True def pageIndexExtentChanged(self, new_id): mxd = arcpy.mapping.MapDocument("CURRENT") legend = arcpy.mapping.ListLayoutElements(mxd,"LEGEND_ELEMENT")[0] if mxd.dataDrivenPages.pageRow.LegendPOS == 1: posX = 2 posY = 3.1 elif mxd.dataDrivenPages.pageRow.LegendPOS == 2: posX = 2 posY = 24.6 - legend.elementHeight elif mxd.dataDrivenPages.pageRow.LegendPOS == 3: posX = 19 - legend.elementWidth posY = 24.6 - legend.elementHeight elif mxd.dataDrivenPages.pageRow.LegendPOS == 4: posX = 19 - legend.elementWidth posY = 3.1 legend.elementPositionY = posY legend.elementPositionX = posX >>>>>>>>> So thanks for your help. One last question. The addin produces no error if I open an arcgis project with a Data Driven Page Index Layer without the attribute LegendPOS. In this case it does simply nothing. This is good, but is this normal? Do I have to implement an error behavior for doing it right?
... View more
12-09-2015
01:05 AM
|
0
|
3
|
2310
|
POST
|
Hello, I want to set the position of my legend based on values of a "Data Driven Pages" attribute. Yet I don't have any code. This is just collection of what I think I need. I had to read the value from the Data Driven Page attribute field. posY = tempMap.dataDrivenPages.pageRow.posY posX = tempMap.dataDrivenPages.pageRow.posX And change the values of the legend objekt. mylegend.elementPositionY = posY mylegend.elementPositionX = posX The script should trigger by changing the Data Driven Page. This should also work then I print all pages. def pageIndexExtentChanged(seld, new_id) Problem: I had to change the anchor position to set the correct X/Y values (height and width of the legend is dynamic and may change). How can I achieve this (see picture)?
... View more
12-08-2015
07:29 AM
|
0
|
6
|
5692
|
POST
|
Thank you both for the help. subprocess did the trick. And thanks for the "Pipe" explanation.
... View more
09-09-2015
11:01 PM
|
0
|
0
|
620
|
POST
|
Hello, I try to run a external program from within arcmap. Wherefore I made a model with the model builder. So I can select a point in my shape, run my model and the external program should run with a variable from this point. To start the program I use a simple python script. To explain my problem, I have included the following line of code with which I started. If I uses this, the script does nothing, no error and no execution of anything: os.system(r'C:\Program Files (x86)\AquaInfo\AI-Viewer.exe SystemMDW=C:\Program Files (x86)\AquaInfo\Aqua.mdw|UserMDB=C:\Program Files (x86)\AquaInfo\System\AI_mbn.mdb|DataBaseName=C:\Users\ps\Desktop\atest\Test.mdb|UserId=99999998|ObjIdsList=7297|SelObjId=7297|ObjType= 0|') If I put this into windows cmd the program starts: "C:\Program Files (x86)\AquaInfo\AI-Viewer.exe" "SystemMDW=C:\Program Files (x86)\AquaInfo\Aqua.mdw|UserMDB=C:\Program Files (x86)\AquaInfo\System\AI_mbn.mdb|DataBaseName=C:\Users\ps\Desktop\atest\Test.mdb|UserId=99999998|ObjIdsList=7297|SelObjId=7297|ObjType= 0|" If I am using this python code in my module, the program starts with an error because obviously some variables are not set: os.system(r'"C:\Program Files (x86)\AquaInfo\AI-Viewer.exe"') Same if I try this: os.system(r'"C:\Program Files (x86)\AquaInfo\AI-Viewer.exe"' + " SystemMDW=C:\Program Files (x86)\AquaInfo\Aqua.mdw") As soon as I enter the Pipe Character "|" the script doesn't work any more. I tried to replace "|" with chr(124) but still the same error. os.system(r'"C:\Program Files (x86)\AquaInfo\AI-Viewer.exe"' + " SystemMDW=C:\Program Files (x86)\AquaInfo\Aqua.mdw|") I am not very firm with python, I am more experienced in vbs. Is there a problem with the "|" Character in Python Strings then it is used for a path with os.system? How can I solve this. Any ideas? Thanks for your help.
... View more
09-04-2015
05:03 AM
|
0
|
3
|
3278
|
POST
|
Thanks all for your suggestions. I will give ArcObjects a try and deepen my knowledge in Python. I also will make considerations about Access. Even that, in the moment, I don't see a "easy" way for us to switch. @James Crandall: Your Application looks really great! That would be my goal if I would be able to develop such a project. But maybe I could handle something less sophisticated. I will award some shiny Stars, so this functionality of the "forum" will be tested too. Edit: Ok, it is only possible to mark one correct answer. Sorry. But thanks to Matthew Lewis too.
... View more
08-26-2014
11:38 PM
|
0
|
0
|
114
|
POST
|
The benefit of using Access is the easy possibility to develop db based programs. At least for us and ok "programs" is a little too ambitious. On this way users can easily insert data, get information, print reports, export data, perform calculations without using ArcGIS. For some users ArcGIS is too complex to use (and they could produce too many errors). So the "native" support of geodata in an Access DB is very useful for us. We don't use Access only for some SQL based changes. That could be done in file geodatabaes too. My goal is to transfer some of these "easy to use forms" directly into arcgis. So maybe, someday, Access is not longer necessary for our geodata based projects.
... View more
08-25-2014
11:41 PM
|
0
|
1
|
672
|
POST
|
I will take a look at ArcObjects. Thanks. I read too that ESRI will resign mdb support. Since there is no easy way to manipulate file geodatabase from within Access, I will not upgrade to such a version. I need this on a daily base.
... View more
08-25-2014
03:58 AM
|
0
|
3
|
672
|
POST
|
Thanks for your answers. Even if they are by mistake I know that I can make relationships between layers and show this with the information tool. But i try to make something that gives a better overview. So it is easier to get information quickly. The mentioned layers are within a personal geodatabase. I already did something like this form within Access. If I click the mdb a start form shows up. There I can insert a ID and a second form shows the overview of the data of the line and the connected polygon features. I can edit values there too. This all works out perfectly. Within Access (using the very same mdb as my ArcGIS mxd). Now I want to accomplish a similar form directly in ArcGIS. So it is possible to edit the geometry and have a clear view of a specific line and all connected data. There are many values for the line layer and for the connected polygons.
... View more
08-22-2014
07:41 AM
|
0
|
6
|
672
|
POST
|
Hello, so let's see if the new forum works. I want to begin a python project. I have a little experience in things like SQL, VBA, PHP and I did a few little python scripts. Before I start this project I would like to know whether it is possible in principle. I know that this is no easy thing but I am willing to learn. Ok, here is what I want to do. In my ArcGIS project there is a line shape and polygon shape. In both layers are joint ID fields. So some polygon features are connected to one line feature by this ID. I want to create an addon that, if a line is selected, show me the data from the line feature in an form view. In that same form the data of all connected polygon features (via the ID) should be shown underneath in a tabular view. If it is possible the values should be changeable. So is this possible to achieve with ArcGIS and Python? Thanks for your help and sorry for my English.
... View more
08-21-2014
08:27 AM
|
0
|
11
|
1496
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|