View Full Version : external tools enabled
2005-11-07, 06:36 PM
does anyone know why my external tool would only be active/enabled when im in certain view modes. only a handful of view modes allow me to select and use my tool. if anyone could shed some light on this i would appreciate it.
Not totally sure what you mean? Where do you want to run your command? You can't run a command if the project browser has the focus.
ps: Did you sort out your debugging problem?
2005-11-07, 07:07 PM
well i have it setup in the .ini to add my tool, which adds the menu option to
tools->external tools->my tool. when the file is in the workspace, most of the view modes grey out my tool. its only in a select few modes that i can actually run my tool. i dont know what is causing this, because what i want is for the scene/project/workspace to be in any of the available modes and still be able to use my tool.
no, the debugging issue is still an issue. the guys at ADN are still trying to figure out whats wrong with it. they can reproduce the problem, but as of now they have no idea why.
they can reproduce the problem,
That's a start!
Regarding modes. You can't run a command when you're editing(say creating a floor), you can't run a command when you're in another command. Every command must run to completion before another command can run. This is to protect database integrity I believe.
Note, you do have 2 different selection modes for API commands. You can select a number of elements and run the command against just those elements (faster) or run a command against the whole database (slower). When running a command against the whole database it doesn't matter where you are in the model the command will be able to access the complete model database.
2005-11-07, 07:30 PM
I've noticed this as well. You can't run your command from a Schedule view for example. I'm not sure why that is either. Maybe the factory can shed some light on when you can/can't use an external tool.
2005-11-07, 07:45 PM
well, as far as i know, im not running any other commands. i load in a file and then go to apply my tool to the file. im not trying to edit it(i dont know if by default it thinks im editting, i AM new to this program) and the project browers does not have focus. sorry if this isnt enough information. i just cant think of any other pertinent info.
Maybe the factory can shed some light on when you can/can't use an external tool.
I suspect the logic is, the command would only be run where you can 'see' the results of a change. Presenting a list in a command window is simple so would it really be useful running from a schedule window?
I guess another one for the API wishlist. Should we create a sticky API wishlist?
Steve, it's great to see more interest on this API forum. However, I'm curious as to what support ADN gives you? Doesn't ADN have their own forums where you can ask these sort of questions and get direct feedback from the developers? What do you get for the money :-)
i just cant think of any other pertinent info.
If tools->external commands are greyed out then the main window doesn't have the focus. You do have a project loaded don't you? You can't run a command without loading a project. Open a floor plan and go to tools->external tools and your command should be able to be run.
2005-11-07, 08:00 PM
It would make sense to run an external tool from a schedule window if your tool updated a bunch of values there. No need to switch to a plan view first.
API wishlist sticky is a great idea.
I'm also curious about what you get for the money with ADN (at least from the Revit side).
2005-11-07, 08:14 PM
first off: the external tools menu option is not what is greyed out. my tool under the listings is what is greyed out(it is also the only external tool listed). it just seems to be one headache after another on this project. but i guess that's the price when you try to develop on something that is fairly new.
so far with ADN i havent had much success. ive gotten good respsonses for general questions, however the response rate isnt nearly what it is here. and thats saying something for you guys, seeing how it seems to be only a select few who can even add a suggestion. so thank you. also in terms of them, i have yet to get a solution to my debugging problem which you wouldnt think would be too difficult to fix, especially dealing with the developers themselves.
its just very difficult to get information when there are only two forum sites and an API that reads like jibberish because of the layers upon layers of encapsulation and lack of commenting. from what i have heard this really IS a good program, its just difficult to learn the API(at least for me, being so new to it as well as CAD in general) .
so, i dont know what to do now, i guess just keep posting and see if someone can give a suggestion that strikes a bell.
thanks everyone for the input, im sure ill be talking to you more as the weeks pass.
ps if anyone can think of something i may have overlooked, TELL ME, PLEASE. because im def a newbie when it comes to this one.
i have yet to get a solution to my debugging problem which you wouldnt think would be too difficult to fix, especially dealing with the developers themselves.
Could this thread (http://forums.augi.com/showthread.php?t=28514) be related to your debugging problem. I'm not sure what "the API becomes compatible with VS 2005" means but are you using VS2005 Steve? Hopefully that doesn't mean NET 2.0.
first off: the external tools menu option is not what is greyed out. my tool under the listings is what is greyed out(it is also the only external tool listed)
Strange. I would post a screen shot of the command, post the initialisation of your command ie. first few lines of your execute method.And post your ini entries. And if that doesn't help compile a simple command (echo) that we can run on our PC's and upload that.
nd an API that reads like jibberish because of the layers upon layers of encapsulation and lack of commenting. from what i have heard this really IS a good program, its just difficult to learn the API(at least for me, being so new to it as well as CAD in general) .
It's not that bad!!! Yes it would be great to have some more documentation but that's what ADN is for... Or so we're told. The encapsulation is so that they can expose only the areas of Revit they want to. And long may that continue.
Are you an architect/designer? If not then some of the concepts may be foreign to you. I would suggest spending some time on Revit tutorials to understand how Revit works. I'm finding the API reasonably easy to understand.
You're really having a hard time of it ;-) I hope you can see the light at the end of the tunnel.
2005-11-08, 01:04 AM
Your tool will be grayed out as I mentioned before if you are not in a model view. See the attached image. "My Custom tool" is grayed out because I have the Dimension tool active. In your Revit, double-click on "Level 1" under "Floor Plans" in the Project Browser, and make sure the Modify tool is active by clicking on it. Your external tool should now be available. If it's not, something strange is going on.
As an AutoCAD developer, I struggled at first with the API structure because it was different from anything I had ever worked with. Having some Revit knowledge helps as Guy mentioned, so I would agree with him that running through a few tutorials should help you. I also realized that most of my confusion/frustration was not being able to find a particular object in the object model, not because I didn't know where to look as it turned out, but because a lot of things are missing.
Keep your chin up, and keep asking questions! ;) It helps us too to think about what's possible.
2005-11-08, 01:40 PM
i must admit, i am just getting frustrated, the API is NOT that difficult, i was just looking for an excuse to vent.
im using visual studio 2003 not 2005. the guys at ADN have responded back with what will hopefully be the fix for my debugging issue.
i am a developer. i have no CAD/designer experience(im strickly a developer).
once i play around with this a little more, it will be easier(i hope).
ill try and get a screen shot or two up, but i've got a couple of things i have to take care of first. one problem at a time.
Powered by vBulletin® Version 4.1.11 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.