POST
|
Hello, I'm developing with VS 2010 and C# for ArcGIS 10.0. I created a custom commandbar and added custom buttons to it. I'm wondering now if it's possible to export it to a proper commandbar.dll and commandbar.tlb. I need to do it at runtime. As I understood, I can generate a .dll with CodeDomProvider but I don't know if I can pass a commandbar object to it, from the documentation I read I can't tell. Then it would be possible to use regasm commandbar.dll /tlb:commandbar.tlb to create a tlb file, at least theoretically, I'm not sure if this would work. So I have the following questions: 1. Is exporting a programmatically created commandbar to an esriaddin-bundle feasible at all? 2. If so, can anyone please give me a hint on how to do that or how to use CodeDomProvider (yes, I found examples but not on passing an object). Thanks very much in advance! Kianar
... View more
10-16-2013
12:14 AM
|
0
|
1
|
727
|
POST
|
Hello, I'm developing with VS 2010 and C# for ArcGIS 10.0. I created a custom commandbar and added custom buttons to it. I'm wondering now if it's possible to export it to a proper commandbar.dll and commandbar.tlb. I need to do it at runtime. As I understood, I can generate a .dll with CodeDomProvider but I don't know if I can pass a commandbar object to it, from the documentation I read I can't tell. Then it would be possible to use regasm commandbar.dll /tlb:commandbar.tlb to create a tlb file, at least theoretically, I'm not sure if this would work. So I have the following questions: 1. Is exporting a programmatically created commandbar to an esriaddin-bundle feasible at all? 2. If so, can anyone please give me a hint on how to do that or how to use CodeDomProvider (yes, I found examples but not on passing an object). Thanks very much in advance! Kianar
... View more
10-16-2013
12:12 AM
|
0
|
0
|
499
|
POST
|
Hello, I'm developing with VS 2010 and C# for ArcGIS 10.0. I created a custom commandbar and added custom buttons to it. I'm wondering now if it's possible to export it to a proper commandbar.dll and commandbar.tlb. I need to do it at runtime. As I understood, I can generate a .dll with CodeDomProvider but I don't know if I can pass a commandbar object to it, from the documentation I read I can't tell. Then it would be possible to use regasm commandbar.dll /tlb:commandbar.tlb to create a tlb file, at least theoretically, I'm not sure if this would work. So I have the following questions: 1. Is exporting a programmatically created commandbar to an esriaddin-bundle feasible at all? 2. If so, can anyone please give me a hint on how to do that or how to use CodeDomProvider (yes, I found examples but not on passing an object). Thanks very much in advance! Kianar
... View more
10-16-2013
12:09 AM
|
0
|
0
|
621
|
POST
|
Hi jamesfreddy, thanks a lot for your explanatations. I did a lot of research already and found the info that it's not possible to create custom commands at runtime (http://forums.arcgis.com/threads/11155-Add-dynamically-created-command-to-dynmically-created-menu). That's why I thought that Python might be an option. In case you see a way to create custom commands at runtime, please don't hesitate so let me know how :-). But this is a topic for another forum anyway... Regards Kianar Your most appropriate options are: 1. COM/ArcObjects Components 2. .NET Add-In Without knowing what kind of functionality you plan to build, I'd say any significant map interaction should be handled with ArcObjects as the Python mapping library simply is not that extensive and will limit your options. But as Hornbydd alludes to, it depends on the functionality you plan to provide. The biggest difference between the two options listed above I think resides with getting your tools distributed. I don't have experience with the .NET Add-in, but from what I understand it affords much more UI development tools than the Python Add-In does, but is more limited than a full-blown COM component. The .NET Add-In has the advantage of easy distribution, while the COM/ArcObjects tools will need to have Installer.msi/.exe component and must be run to get your tools installed on the end-user's workstation. I can assure you that IToolBardef, BaseCommand, ICommandItem all work fine and you simply need to do more research and testing to get it to work.
... View more
09-13-2013
12:29 AM
|
0
|
0
|
102
|
POST
|
Hornbydd, thanks a lot for your hint, I'll check this out! Regards Kianar You can store custom tool bars in an mxd created via the menu option customize > customize mode route and then say distribute an mxd. You need to go to menu option customize > customize mode > Options tab and click on "Save all customizations to the document". This is something that appeared in 10.0.
... View more
09-13-2013
12:03 AM
|
0
|
0
|
507
|
POST
|
Hi Hornbydd, right, but with ArcGIS 10.0 (or 10.1, I'm not sure) the custom toolbars get stored in the Normal.mxd and no longer in single mxd-files which makes it hard to share the toolbar with others and that is exactly what I need. You say "...let a user define a custom Toolbar with custom commands and menus on the fly and make them persistent". Is that not what the desktop menu option customize > customize mode all about? This allows the user to create a toolbar, drag any existing tool onto it and have their own customized toolbar? Look here on customizing a map document.
... View more
09-11-2013
11:31 PM
|
0
|
0
|
507
|
POST
|
Hornbydd, thanks for your time... I don't necessarily need a Python Addin, I need to write code to let a user define a custom Toolbar with custom commands and menus on the fly and make them persistent. What those commands and menus are supposed to do is currently not so important. The problem is, that I can't seem to create them otherwise and would like to know if I can create the Toolbars with Python. Hope, this makes it clearer. Regards Kianar Correct Python AddIns only appeared in 10.1 so do not exist in 10.0 You say your tasks are to create toolbars with commands/menu but you don't say what these will actually do, this is what I was trying to get at? Are you intending to do complex fine grain manipulation of geometries (then ArcObjects is the way to go) or call upon existing geo-processing tools to improve a workflow (then may be python is your answer)? Why can't you use the addin wizard? With this you create the toolbar and controls, attach your code and then you have an addin which can be easily installed and distributed.
... View more
09-11-2013
02:25 AM
|
0
|
0
|
507
|
POST
|
Hello Horbydd, thanks for your reply. My tasks are described in the first paragraph of my last post. Did I understand you right, that I can't use Python to create custom Toolbars with custom menus / commands for ArcMap 10.0? Thanks for the link but as I said, I need to create the Toolbar programmatically notby using a wizard. Regards Kianar Kianar, What are you tasks? If it is using existing tools then python could be a solution. If you are doing serious number crunching then may be ArcObjects is the way. If you want fancy user interfaces then ArcObjects is what you need using VB/c# .net With the release of 10.1 ESRI created the Python Addin, this allows you to use your python coding skills with arcpy and create tool bars with buttons that can interact with the map. Have a look here. I've had a play with this and you can use all that is arcpy but you still cannot create an interface, although some python expert will hopefully tell me otherwise! Duncan
... View more
09-11-2013
01:32 AM
|
0
|
0
|
507
|
POST
|
Hi, I need to create a custom toolbar programmatically and add custom commands / menus to it. The whole toolbar needs to be persistent and be handed over to other people. In the last weeks I was fuzzing around with .NET and IToolBardef, BaseCommand, ICommandItem and what not but I just couldn't add the custom commands to the toolbar, just standard ESRI-commands would work. Can you please tell me, if I can use Python Scripting for this and is it possible to start Python scripts from xaml-Dialogs? I know there are a couple of Python tutorials around but before I invest a lot of time again I'd like to know if Python scripting is basically the right approach to fulfill my tasks. Thanks a lot in advance for your help! Edit: Sorry, I forgot to mention that I use VS 2010 with .NET3.5 for ArcGIS 10.0 and higher. Kianar
... View more
09-11-2013
12:33 AM
|
0
|
10
|
2774
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|