Jump to content

Our forum made possible by displaying online advertisements to our visitors.

Please consider supporting us by disabling your ads blocker.

  • Announcements

    • EmperoR

      Dear Guests   12/24/2016

      Welcome to the GIS-AREA. like most online communities you must register to view or post in our community, but don't worry this is a simple free process that requires minimal information for you to signup. Be a part of GIS-AREA by signing in or creating an account here. Once you have created your account and have introduced yourself to our community, you can start new topics, reply to others, subscribe interesting threads, get your customize profiles, make news friends, and others nice stuff. To make your stay as pleasant and constructive as possible, please don't forget to read through our pinned forum rules and board guidelines in each section before you do anything else.
Sign in to follow this  

[TANYA] Arcgis python Add in

Recommended Posts

Ada yang pernah buat Arcgis python addin tapi untuk interface pakai Tk inter atau Wxpython atau Qt.

Saya sudahcoba untuk Tkinter arcmap jadi crash, kalau pakai wxpython dialog ga bisa di close,

jadi untuk interface sementara tetep pakai dialog arctoolbox,

import arcpy
import pythonaddins
import wx

class ToolClass2(object):
    """Implementation for DesignTool.tool (Tool)"""
    dlg= None   
    def __init__(self):       
        self.enabled = True
        self.shape = "NONE" 
    def onMouseDownMap(self, x, y, button, shift):
        global laylist
        for lyr in arcpy.mapping.ListLayers(mxd):
        del mxd
        if self.dlg is None:  
            self.dlg = TestDialog()  

class TestDialog(wx.Frame):  
    def __init__(self):  
        wx.Frame.__init__(self, None, -1, "Main Menu", style=wxStyle, size=(330, 370))  
        self.SetMaxSize((330, 370))  
        self.SetMinSize((330, 370))  
        self.Bind(wx.EVT_CLOSE, self.OnClose)  
        panel = wx.Panel(self, -1)  
        wx.StaticText(panel, -1, "Choose Layer:", pos=(8,64))  
        self.LayerCombo = wx.ComboBox(panel, -1, value=laylist[1], pos=(180, 64), size=(120,21), choices=laylist)
        self.Bind(wx.EVT_BUTTON, self.OnSet, id=self.btnSet.GetId())  

    def OnClose(self, event):  
        self.Show(False) # self.Destroy() doesn't work          

    def OnSet(self, event):  
        Layerpath= str(self.LayerCombo.GetValue())  

app = wx.PySimpleApp()  

kalau ada share code samplenya dong,



Edited by asnaeb

Share this post

Link to post
Share on other sites
On 9/23/2017 at 3:31 AM, Lurker said:

pake arcgis berapa?


ane bukan programmer jadi bantu2 searching aja untuk trouble sejenis

intinya pada kompatibilitas untuk tkinter

dev di 10.5,

usernya di 10.2.2 -10.5

makasih bang infonya, ternyata di wxpython sama tkinter kalau di arcgis emang kayanya ga bisa pake close button window.



  • Like 1

Share this post

Link to post
Share on other sites

ehehehe, nanti kalo dah ketemu solusinya n rampung pluginnya bisa cerita-cerita dimarih yah ehehehehe

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  


Important Information

By using this site, you agree to our Terms of Use.