An interesting issue came up today related to the Fiber Availability AU and the Fiber Mass Update AU. When a user updates a F_Fiber record, that causes the related FOC record to update. Because I introduced logic into the FOC updater to display a messagebox if there aren't enough available fibers, you might see that message. However, the Mass Update AU can also cause other edits to connected fibers....those fibers will also result in their related FOC features getting updated. So, unfortunately, we were seeing a lot of message boxes popping up.
The solution that i came up with, which does seem like a bit of a hack, is too NOT display the messagebox unless a certain amount of time has elapsed. The code for this is now in Telvent.SE.FiberAvailabilityPercentage AU. It actually seems to work rather nicely, but what would really be nice is if there was a good way to determine what edit transaction we were in.
UPDATE - Stetson is suggesting that I listen for OnStopEditOperation. Interesting approach.
My Blog List
Friday, July 29, 2011
Fiber Available Percentage
I also worked on the Fiber Available Percentage Autoupdater today and made a change to it. Based on a XML configuration setting now, you have the ability to specify a certain threshold when you update FiberOpticCable. If the percentage of available fibers for that FOC is less than that configurable number, then you will see a warning allowing you to not apply the edit. This utilizes MM_E_CancelEdit which is in Miner.Interop.System.
throw new COMException("Error in xxx ", (int)mmErrorCodes.MM_E_CANCELEDIT);
Don't forget when throwing exceptions like this to NOT catch them!! If you catch a thrown COM exception the the exception won't get propogated to the the AU framework and the edit will not be cancelled.
throw new COMException("Error in xxx ", (int)mmErrorCodes.MM_E_CANCELEDIT);
Don't forget when throwing exceptions like this to NOT catch them!! If you catch a thrown COM exception the the exception won't get propogated to the the AU framework and the edit will not be cancelled.
Telvent.SE.FiberTools Customer Report
Ryan was reporting a problem with the Telvent.SE.FiberTools Customer Report tool not working correctly in an SDE environment (although he said it was working against a personal geodatabase). I looked into the code today and I seem to be able to get it to work on my machine just fine. Perhaps my code is more up-to-date than Ryans or something. Possibly the XSLT is more up to date. I did notice a couple of potential gotcha's in the code. The first is that you have to have the CUSTOMERINFO table in the map otherwise it won't work. Also, each customer needs to be populated with a customer priority. It seems that the CustomerList will not get built properly if that is not in place. The priority affects the color coding of the report.
UPDATE - It turns out that the code that I got to work on my machine was an old copy of Brooks' code. Ryan can use that for now. Not quite sure where the "new" code is, but we know that it doesn't seem to quite work on SDE. Apparently the new style sheet allowed for collapsible regions. The ICommand also was a little different (blue with no fiber bars unlike the screenshot below).
UPDATE - It turns out that the code that I got to work on my machine was an old copy of Brooks' code. Ryan can use that for now. Not quite sure where the "new" code is, but we know that it doesn't seem to quite work on SDE. Apparently the new style sheet allowed for collapsible regions. The ICommand also was a little different (blue with no fiber bars unlike the screenshot below).
Interview questions
I uploaded a couple of sets of interview questions (designed for a technical interview). The first document is very similar to the second document. They both have essentially the same set of questions and the same categories (.NET, C#, ArcObjects, ArcGIS, ArcGIS Server, Programming, Web/ASP.NET, Database, Other) but they are just asked in different ways. The idea that I was toying with is to actually give one set of these questions to an interview canditate before their phone interview. They could use the questions to prepare for the interview. The questions are different enough that a correct answer should provide confidence to the interviewer that there is a fairly deep understanding. There's obviously a lot of questions here, so probably you could split them 50/50 for phone and on-site.
Questions #1
Questions #2
Questions #1
Questions #2
Post build event to call RegX
It's often handy to be able to call RegX from within a Post Build event. This will get your component (e.g. Autoupdater in the right component category).
RegX.exe "$(TargetPath)" /r /c /s
In your class, you need this
Using Miner.Interop;
Using Miner.ComCategories; // Reference Miner.System and Miner.Interop.System
[ComponentCategory(ComCategory.ArcMapCommands)]
public sealed class AAL_QA : BaseCommand
{
}
RegX.exe "$(TargetPath)" /r /c /s
In your class, you need this
Using Miner.Interop;
Using Miner.ComCategories; // Reference Miner.System and Miner.Interop.System
[ComponentCategory(ComCategory.ArcMapCommands)]
public sealed class AAL_QA : BaseCommand
{
}
FiberManager Mass Updater
Worked on an Autoupdater today that was designed to mass update things like fiber or FrontSidePorts when certain attributes were updated. The AU is designed for the on-update event of a FiberManager feature class. The assumption is at least one field would have the model name "FIBERCASCADEUPDATE". When you update a field (say using the Attribute Editor), then a fiber trace is performed (using Andy Canfield's API) and all "like" rows are returned and the fields answering to the model name are updated to match the row getting updated. I added a tweak so that the user gets prompted as to whether they actually want to perform the bulk update. We tested on Fiber and FrontSidePort, but it should be flexible enough for anything Fiber related really. I placed the code on Monster on the D drive at \\monster\Ddrive\10_SOURCE\Telvent.SE.FiberMassUpdater. To get it to work, you will need to RegX the main .dll, and that should be just about it
Subscribe to:
Comments (Atom)

