PDA

View Full Version : API External commands crashing revit only in one revit job



r.howarth
2008-04-11, 04:36 AM
I've developed some external commands that do various things, mostly just toggle visibilities and what not, but a few others as well.

We've been using them with great success in our office, but today a user came up to me and said that whenver he uses them they crash his revit.

I tried a couple of revit files on his computer, his file, and the central file both crash, but any other job doesn't do it.

Has anyone encountered this??

Elizabeth Shulok
2008-04-11, 04:22 PM
If I have an external command that crashes on some jobs and not others, it has typically been due to some kind of element in the model that I wasn't handling correctly. I might be trying to get a parameter, for example, that I assume is always there, but for some reason isn't, and it crashes because I don't check if the param is null before continuing.

But if the same commands on the same jobs run on your computer and just not that one guy's, have you checked they he has the same build of Revit on his computer that you have?

r.howarth
2008-07-09, 01:58 AM
just digging this one up, I do have try catch blocks around all my code, and none of htem pick up anything, so it's not your normal exception. The command is hit, and the WHOLE of revit crashs, not just the external command. its for any external command, even my simplest ones... very weird, not a big deal, he is living without them for this job, but an interesting bug..

build is the same etc too

GuyR
2008-07-09, 02:51 AM
The one thing guaranteed to crash Revit is a cross thread call, are you using threading? Isolate the element causing the crash and see if that helps isolate the problem. I've had a corrupt object in a project crash revit before. Unusual though. Also check the journal for any hints.

Cheers,

Guy