POST
|
Hi, Rebecca, Thanks for your suggestions. I checked all the things you mentioned and revise my code and I tried so many times even create a new work, but it still not works. I feel so desperate. I am a beginner of python, so maybe I did something wrong. If possible, could you please show me some of your folders (addin, Install and script) and python add-in wizard, because I want to compare your folder and my folder to find some differences? The folder that I want to see as below. And I have a question. When I try to move the script addin_addin.py automatically created by wizard to the Script folder, I find the "addin_addin.py" in the Script folder is not the actual addin_addin.py, so I think maybe it is a problem but I don't know how to fix that. Do you know how to fix it? Thank you so much. Fig.1 addin folder Fig.2 Install folder Fig.3 python add-in wizard
... View more
01-04-2018
04:08 AM
|
0
|
1
|
673
|
POST
|
Hi, Dan, thanks for your suggestion. Below is my formatted code. import arcpy
import pythonaddins
import os
relPath = os.path.dirname(__file__)
toolPath = relPath + r"\Gavle.tbx"
class button1(object):
def __init__(self):
self.enabled = True
self.checked = False
def onClick(self):
button2.enabled = True
button3.enabled = True
pythonaddins.MessageBox("Welcome to Gavle medical system!\n","Gavle medical",0)
class button2(object):
def __init__(self):
self.enabled = False
self.checked = False
def onClick(self):
pythonaddins.GPToolDialog(toolPath, "Servicearea")
class button3(object):
def __init__(self):
self.enabled = False
self.checked = False
def onClick(self):
pythonaddins.GPToolDialog(toolPath, "Findroute")
I tried all the methods in comments, but it still not works.
... View more
01-04-2018
01:45 AM
|
0
|
2
|
673
|
POST
|
Hi, Curtis. I tried the link and renamed the tool, but it still has the same problem. Below are the pictures of my revised code and steps. Could you please help me to check the problem? Thank you so much. Fig.1 Fig.2 the contents of the Install folder Fig.3 the contents of the script folder
... View more
01-03-2018
07:30 AM
|
0
|
0
|
872
|
POST
|
Hi, Rebecca. I tried your post and renamed the tool, but it still has the same problem. Below are the pictures of my revised code and steps. Could you please help me to check the problem? Thank you so much. Fig.1 Fig.2 the contents of the Install folder Fig.3 the contents of the script folder
... View more
01-03-2018
07:28 AM
|
0
|
7
|
673
|
POST
|
But the model cannot be executed no matter the error is ignored or not.
... View more
01-02-2018
02:51 PM
|
0
|
0
|
872
|
POST
|
When I click button2 (the second button on the toolbar on figure 2), I want to execute "make service area" and button3 is about "find route". So could you please tell me how to revise the code to fulfile the function that I want. Thank you so much!
... View more
01-02-2018
02:40 PM
|
0
|
0
|
872
|
POST
|
Hello! I try to click a button that I created in python add-in to execute a model (this model is made of the script tool), the button1 is ok, but when I click the button2 or button3 on the toolbar, it has an error as the title. Below are the pictures of my code and error. Fig.1 code Fig.2 error (look at the black part of error dialog, this error dialog repeats almost 50 times!) Looking for your reply, thank you so much.
... View more
01-02-2018
02:26 PM
|
0
|
18
|
2031
|
POST
|
Hi, I made a model of finding closest facilities in model builder. When I run this model in the model builder, it works but when I open it, it cannot work and it had a warning as the title said "WARNING 030025: Partial solution generated." Could you please tell me why and how to solve this problem? Thank you so much!
... View more
11-28-2017
02:49 PM
|
0
|
1
|
607
|
POST
|
Hi, I use "find closest facilities" script tool to do network analysis and I have to use this tool in model builder. I want to choose only one point as facilities, which can be achieved when I use it just as a tool (click the point that you want to choose on the street network). But when I add this script tool in the model builder I cannot choose only one point because I should stop editing in using model builder. Could you please tell me what should I do? Thank you so much.
... View more
11-27-2017
02:30 PM
|
0
|
2
|
521
|
POST
|
Hi, I use "find closest facilities" script tool to do network analysis and I have to use this tool in model builder. I want to choose only one point as facilities, which can be achieved when I use it just as a tool (click the point that you want to choose on the street network). But when I add this script tool in the model builder I cannot choose only one point because I should stop editing in using model builder. Could you please tell me what should I do? Thank you so much.
... View more
11-27-2017
02:26 PM
|
0
|
2
|
333
|
POST
|
Hi, I want to use the function of "find address" in model builder and I have created an address locator, how do I get the picture displayed below in model builder? Thank you so much.
... View more
11-07-2017
12:30 AM
|
0
|
1
|
524
|
POST
|
Thanks for your reply. I do not choose oneway(Fig1) and I choose the Genaralized(Fig2) option, but the 2 holes(Fig3) still exist. I turn on the lines in the Generation and choose Split Lines at Breaks(Fig4) at the same time and I can see the line break value and the value is exactly false(Fig 5. The red polygon is the wrong polygon and the value of line boundary should be 3 but it over 3 ) but I do not know how to fix it. I do not know why the polygon of break 5 was included in the polygon 3 , could you please help me to fix the problems? Thank you so much. Fig1 Fig2 Fig3 Fig4 Fig 5
... View more
09-26-2017
11:58 PM
|
0
|
0
|
354
|
POST
|
Hi, I use the function of "closest facilities" in the Arcgis network analyst. I set the impedance "Minutes" and the default break "1 3 5". But the polygons created have blanks and some of the positions are not correct, could you please help me? Thank you so much.
... View more
09-26-2017
12:35 PM
|
0
|
2
|
699
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|