My Blog List

Monday, November 14, 2011

COMPLETED LIST


  1. Ryan - Get the FMFS application running on the FMSERVER machine

Monday, November 7, 2011

Installation default path - 64 vs. 32 bit

To support installation under the Miner and Miner\ArcFM Solution folder so that it works for both 32 and 64 bit machines, you need to create two registry searches in the Setup project. The first registry search to support 64 bit machines would look for H_KEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Miner and Miner and get the value of the LastInstallDir.  A second registry search for 32 bit machines would look at the same location minus the Wow6432Node.  Importantly both searches should set the same property (MMPATH in the example below).  You then use that MMPATH variable as the value for the Application Folder's DefaultLocation property as shown below. When you run the installer, the correct registry search is magically performed and it seems to just work.

IMPORTANT NOTE: Visual Studio will soon no longer support Setup projects:

http://blogs.msdn.com/b/buckh/archive/2011/03/17/visual-studio-setup-projects-vdproj-will-not-ship-with-future-versions-of-vs.aspx



TASK LIST



  1. Neil - Get attribute viewer working on FMFS application
  2. Neil - On the splice viewer report for FMFS, the graphics aren't going away.  This needs to get fixed. 
  3. Neil - The Trace tab should be removed from the FMFS viewer
  4. Paul - Work on a new report for the SAM forecast















Friday, October 7, 2011

Creating labels inside of tables

Ryan had a requirement to get labels to position themselves inside of tables as shown in the screen shot below. This doesn't necessarily have to involve the use of AAL (although it is easier if you do use it), but rather the use of a custom true type font, label classes, and a familiarity with Maplex.
Here are the important facts about how these labels were created.

Click to enlarge (labels inside of tables)

  • I created a custom true type font using some try and buy software.  The capital letter "A" is the only letter that I defined.  In this case, it is a 5 row x4 column grid with the top row spanning the four columns.  This becomes the background table that the labels sit in.
  • I used AAL to create a simple label expression using the font above but importantly chose the option to use label classes. The label expression for this class is just the letter "A" and is in the default class. 
  • I created a second label class (I just called in Layer2) with no SQL expression so that it always draws, and I created an AAL label expression for this too : "123-456 | ABCD | EFGH | IJKL | MNOP" where the | character is a line-break. Now in reality, the data could of course be derived using something more complex than a simple string (e.g. use the Relationship labeler).
  • You need to tweak some properties in Maplex so that labels always appear and that they are drawn 50% of the way along the line.  Having them draw 50% provides guaranteed placement (a "best" placement might result in the labels from one class going to a different spot than the second class, and remember, they have to line up).  If you are labeling points, this is easier...just choose a positioning strategy in Maplex that provides guaranteed placement. 
  • You will likely need to tweak the label symbol for the data within the cells (e.g.  "123-456 | ABCD | EFGH | IJKL | MNOP").  I used a courier new font so that I had consistent spacing.  I also had to specify an X and Y offset, modify the character spacing and modify the "leading" which is essentially the line-spacing. Remember also to set the label offset for this class to 50% of the way along the line. 
  • It is important to have / respect a reference scale for this layer.  That way the labels will scale appropriately when you zoom in and out. 
  • Last thing that I can think of now is an important setting on the Conflict Resolution tab.  Make sure to choose the option to "Never Remove Labels (overlap)".  In this scenario, we actually want our labels from different classes to overlap.
Because the table is a character in a font,
you can easily set its color!



Thursday, October 6, 2011

Public ftp site

User name = public
password = Sn00py!!   (those are zero's not letters)

Thursday, September 29, 2011

Debugging components in ArcMap - Start External program

The trick to debugging components in ArcMap is to set the Startup program on the Debug tab in Visual studio as shown:




Set the path to:

C:\Program Files (x86)\ArcGIS\Desktop10.0\Bin\ArcMap.exe

Friday, September 23, 2011

Telvent.SE.SWGasQARules - QA rule to check for Excess Flow Valve

The Telvent.SE.SWGasQARules contains a QA rule that checks for the necessity of an Excess Flow Valve (EFV).  It was desgined to work on SW Gas data with minimal configuration (the EXCESSFLOWVALVE model name needs to be added and the QA rule assigned to Service).  The idea with the QA rule was to check if an EFV valve is required using the following logic:

1 - If the Service being QA'ed does not branch (meaning that there is not a three way intersection with all three lines being service) then you must have an Excess Flow Valve present.  In this case, a QA error is generated.  In this, the most simple negative case, you typically just see a single service line feeding a house without a EFV
2- A single service line with an EFV is OK
3 - A branched service line without an EFV is OK
4 - A branched service line with an EFV results in a QA Error (which is described as a warning in the QA/QC tab).

CONFIGURATION -

  • RegX the .dll
  • Add model name EXCESSFLOWVALVE
  • Verify that SERVICEPOINT uniquely identifies MeterSetting (e.g. Riser) as the only feature class.  Note that this may cause problems with Minerville data or other geodatabases where there is an electric dataset which has a ServicePoint feature class. 
  • Verify that the SERVICE model name exists on the Service feature class. 
  • Add the QA rule to the Service Line - It is name Telvent.SE.SWGasQA or something like that...it might have the word EFV in it too. 

Thursday, September 22, 2011

COM components don't show up in ArcCatalog??

If a COM component doesn't show up in ArcCatalog or ArcMap, check the following:

<---->.dll is not a valid assembly

I got an error say ---.dll is not a valid assembly.  Turned out that I had accidentlally set to x64 compilation instead of x86.

Monday, September 12, 2011

Responder AMI Advanced (Telvent.SE.ResponderAMIAdvanced)

Basic steps required for demonstration / testing

  1. Clear out all existing incidents in Responder Explorer
  2. On Claymaker, run TroubleMaker (TM) and select anything with "UP" and "Connect" in the scenario. This will bascially reset the demonstration. 
    1. You can verify that the meters involved in the demo are powered up by running the SQL command QueryStateStore.sql in SQL Management studio (you should see that 13 are Power Up" and 66,000 are unknown).
  3. In ArcMap, open the Smart Grid 2 stored display
  4. Run the Remote Disconnect scenario in TM
  5. Log into Responder Web (http://claymaker/Responder/login.aspx) using Administrator / adminpass
    1. Go to the Customer Service tab and perform a Customer Call
    2. For meter number, type e46295 and click the Search button
  6. Note that the critical status is "Disconnected AMI" but that the status is "Power Up".  This customer simply didn't pay their bill. 
  7. Run AMI power down in TM
  8. Go to the AMI outage area bookmark in ArcMap and refresh the screen (multple times possibly).  You should see six or so customers out of power. 
  9. In RxExplorer, assign crew to the newly created incident
  10. Right-click (RC) on crew assignments to get the crew status to read "working" (indicated by a blue dot)...assing crew IPC 001....you have to go through Dispatced state first, and then wait a few seconds before going to Working. 
  11. Set ETR (estimated time of Restore by RC on incident. 
  12. On RxWeb, note that Jean Haverfield is now power down. 
  13. In TM, select remote connect and AMI power up and execute those scenarios.  Poor customer paid his bill, but the power was off when he did so. 
  14. Manage the incident in RxExplorer through "Restore".

Saturday, September 10, 2011

DOWNLOADS

Telvent.SE.ReportTools - Includes the Gas and Electric Customer reports and many others. download

SW Gas Model Name Report

Bug fix / enhancement request to have the descriptions from coded values output instead of database values.  Completed today (9-10-11)

Gas Customer Report

The Gas customer report now supports multiple customers at a single ServiceAddress. In the example below, three meters are selected. One of the meters has two customers at a single service address.  Note that I have not tested having multiple service addressses at a single meter.  That probably won't work as is. 

Friday, September 2, 2011

SW Gas: Logica WMS / GIS Integration

Assumptions: This code only works on an SDE database. You will get errors when trying to save your design if you are working with a personal geodatabase because in Brook's code, he assumes the existence of a VERSION node in the Design XML.

Exporting image

I was thinking for some reports it might be nice to include a map image.  Here's a little VBA code to do that.  I'd like to see if I can get this to work in the context of an HTML report (e.g. Brook's MM Report tools)


Private Sub export()
    Dim pexp As IExport
    Set pexp = New ExportJPEG
    pexp.ExportFileName = "c:\temp\test.jpg"
    pexp.Resolution = 96
    Dim x As tagRECT
    Dim mxDoc As IMxDocument
    Set mxDoc = ThisDocument
    Dim av As IActiveView
    Set av = mxDoc.ActiveView
    x = av.ExportFrame
    Dim env As IEnvelope
    Set env = New Envelope
    env.PutCoords x.Left, x.Top, x.Right, x.bottom
    pexp.PixelBounds = env
    Dim hdc As Long
    hdc = pexp.StartExporting
    av.Output hdc, pexp.Resolution, x, Nothing, Nothing
    pexp.FinishExporting
    pexp.Cleanup
End Sub

Getting IApplication

When working with IApplication, you can't call New AppRefClass() because AppRef is a singleton object.  Here's what you do instead. 
Type t2 = Type.GetTypeFromProgID("esriCore.AppRef");
System.Object obj = Activator.CreateInstance(t2);
IApplication app = obj as IApplication;
http://forums.esri.com/Thread.asp?c=93&f=1170&t=67573#177441


JAX: AAL - Using conditional logic, ancestor labeler, and SQL functions

I put together a label expression for JAX today for fuses that was rather interesting.  Below are the requirements and the email that I sent to Greg Garner:

Attached are two screen shots showing the label expression that satisfy (I believe) the label expression you were looking for for JAX. This is on Minerville, so of course some of the field names might be different...I used FuseUnit:LinkRating instead of FuseSize (which Minerville doesn't have).  And I used FuseBank:FacilityID because Minerville doesn't have a FuseNumber field.  I changed the errors from "ERROR" to more explicitly state why there was an error (e.g. 'Bank has a null FacilityID' or 'Unit sizes don't match').

The two screen shots show the required SQL for the two relationship labelers that are used.  Note that the expression also uses an ancestor labeler.  Anyway, it is a bit to swallow, but it does, I think, nicely showcase the power of AAL and if you know SQL, it is quite readable.  Let me know if you want to go through the expression or if you have questions about it.

Devon

1.3        Fuse Labeltext AU

Requirement
JAX has map labeling requirements for OH Fuses that include attributes from related child objects, namely the related eFuseunit records.

 The logic for the AU is provided below:

If the eFusebank is 2 or 3 phase and the eFuseUnit.FuseSizes do not match
or the eFuseBank.FuseNumber is null or = “UN”

Then set Label = “ERROR”

Else
eFuseUnit.FuseSize & “A “ & eFuseBank.FuseNumber

Ex. 10A 3321



SQL Expression for first Relationship Labeler
SQL Expression for second relationship labeler

S

Thursday, September 1, 2011

SW Gas: Create perpendicular bisectors

Although as it turns out this code is no longer really needed, I wrote some VBA code to create perpendicular from points to lines (e.g. from disconnected service point to secondary OH).  As shown in the image, this works in edit mode on a selected set of points (first layer in the TOC).  The second layer is the line layer. Click the button and "Bob's your uncle".  You can modify the VBA code (below) to increase or decrease the search distance as required.  Note that it finds the NEAREST line to the selected point, but if outside the search tolerance, than no perpendicular is created.  Make sure to save your edits after editing.  If you undo, all the edits for that one click of the button are undone.

Click to enlarge
Here's the code which you can paste into the VBA editor.  You might want to add a button to the ArcMap UI as shown in the image. 

Option Explicit
Private Sub CreateBisectors()
'PURPOSE - Constructs perpindicular bisectors from the selected point
'in layer #1 to the nearest line in layer #2 within xx feet. Note that
'you must save your edits after using this tool.
'ASSUMPTIONS - must be editing to use the layer.
'This code assumes that the point layer is the first layer in the TOC
'and that the line layer (the layer that we will be adding to) is the
'the second layer
Dim SEARCHDISTANCE As Double, SUBTYPECODE As Long
SEARCHDISTANCE = 10
SUBTYPECODE = 1

On Error GoTo eh
Dim startedOperation As Boolean
Dim ed As IEditor
Set ed = Application.FindExtensionByName("ESRI OBJECT EDITOR")
ed.StartOperation
startedOperation = True
Dim sf As ISpatialFilter
Set sf = New SpatialFilter
sf.GeometryField = "SHAPE"
sf.SpatialRel = esriSpatialRelIntersects
Dim mxdoc As IMxDocument
Set mxdoc = ThisDocument
Dim pntLayer As IFeatureLayer, linLayer As IFeatureLayer
Set pntLayer = mxdoc.FocusMap.Layer(0)
Set linLayer = mxdoc.FocusMap.Layer(1)
Dim linFC As IFeatureClass
Set linFC = linLayer.FeatureClass
Dim feSel As IFeatureSelection
Set feSel = pntLayer
Dim pntCur As IFeatureCursor
feSel.SelectionSet.Search Nothing, False, pntCur
Dim pntFE As IFeature
Set pntFE = pntCur.NextFeature
Do While Not pntFE Is Nothing
  Dim selPoint As IPoint
  Set selPoint = pntFE.ShapeCopy
  Dim topOp As ITopologicalOperator
  Set topOp = selPoint
  Dim buf As IGeometry
  Set buf = topOp.Buffer(SEARCHDISTANCE)
  Set sf.Geometry = buf
  Dim linCur As IFeatureCursor
  Set linCur = linLayer.Search(sf, False)
  Dim linFe As IFeature
  Set linFe = linCur.NextFeature
  Dim nearestSoFar As Double
  nearestSoFar = SEARCHDISTANCE
  Dim nearestLineFe As IFeature
  Set nearestLineFe = Nothing
  Do While Not linFe Is Nothing
    Dim proxOp As IProximityOperator
    Set proxOp = linFe.ShapeCopy
    Dim retDist As Double
    retDist = proxOp.ReturnDistance(selPoint)
    If (retDist < nearestSoFar) Then
      Set nearestLineFe = linFe
      nearestSoFar = retDist
    End If
    Set linFe = linCur.NextFeature
  Loop
  If Not nearestLineFe Is Nothing Then
    Dim c3 As ICurve3
    Set c3 = nearestLineFe.ShapeCopy
    Dim outPoint As IPoint, dac As Double, dfc As Double, brs As Boolean
    Set outPoint = New Point
    c3.QueryPointAndDistance esriNoExtension, selPoint, False, outPoint, dac, dfc, brs
    If Not outPoint Is Nothing Then
        Dim newFe As IFeature
        Set newFe = linFC.CreateFeature
        Dim pl As ISegmentCollection
        Set pl = New Polyline
        Dim ln As ILine
        Set ln = New Line
        ln.FromPoint = outPoint
        ln.ToPoint = selPoint
        pl.AddSegment ln
        Set newFe.Shape = pl
        newFe.Value(newFe.Fields.FindField("SUBTYPECD")) = SUBTYPECODE
        newFe.Store
    End If
  End If
  Set pntFE = pntCur.NextFeature
Loop
ed.StopOperation "Create perpindicular bisectors"
startedOperation = False
mxdoc.ActiveView.Refresh
Exit Sub
eh:
MsgBox "An error occured. Please stop editing, and do NOT save edits."
If startedOperation = True Then
    ed.StopOperation "An error occured. Please do not save edits"
End If

End Sub


Private Sub UIButtonControl1_Click()
CreateBisectors
End Sub



Wednesday, August 31, 2011

SW Gas: Select by Model Name report

I created a generic report that is designed to extend the list of reports available on the ArcMap Report toolbar.  The button in ArcMap looks like this:

Note that the "M" in the icon stands for ModelName.  The idea of the report is that it looks at the maps selected set of features and generates a report based on a configuration XML (Telvent.SE.ReportTools.Config.XML).  Essentially it reports out each item in the selected set if that feature is in the configuration list.  if it is in the configuration list, then all of the fields that you specify are reported. Below is an example of the output based on the XML snippet shown below:


  <SelectionByModelNameReport>
    <ClassModelName name="ControllableFitting" primaryField="FacilityID" fields="fACILITYID,OBJECTID" />
    <ClassModelName name="Valve" primaryField="FacilityID" fields="ObjectID,FacilityID,InServiceDate,CreationUser,ValveType,ValveUse,ValveDiameter" />
    <ClassModelName name="Pipe" primaryField="OBJECTID" fields="ObjectID,PipeType,PipePressure,Shape_Length" />
    <ClassModelName name="Regulator" primaryField="FacilityID" fields="FacilityID,ObjectID" />
    <ClassModelName name="NonControllableFitting" primaryField="FacilityID" fields="FacilityID,ObjectID" />
    <ClassModelName name="ServicePoint" primaryField="FacilityID" fields="FacilityID,LocationID,Premise" />
  </SelectionByModelNameReport>



Unlike Brook's reports, this does not use an XSLT style sheet.  Instead it uses a template HTML file.  The file is named, SelectionByModelNameTemplate.htm, and must be located in the same directory as the reports .dll and the configuration file.  If you are familiar with HTML, it should be easy to modify this template file.  You will see two special placeholder locations within the HTML file. ***GENERATED_DATE***, and ***TABLE***.  These two areas are overwritten during the creation of the report.  
As you can see from the output, you can have one specific field which is shown with a brown background color which acts as the Primary field.  Typically this would be FacilityID or maybe ObjectID. The comma separated list of fields in the configuration XML then specifies which fields you want to see in the report. 
Like some of the other reports on the Reports toolbar, you can right-click and have the relevant feature blink in the map. 


Update - This report was just modified to add support for images.  The ShowImages attribute is now required.  If ShowImages is set to "True", then the other parameters shown in the working XML snippet below become mandatory as well. 



 <SelectionByModelNameReport>
    <ClassModelName name="ControllableFitting" primaryField="FacilityID" fields="FacilityID,ObjectID"  showImages="False" />
    <ClassModelName name="Valve" primaryField="FacilityID"  fields="FacilityID,ObjectID" showImages="True" imagePrompt="True" imageHeight="300" imageWidth="300" imageResolution="96" imageScale="500" imageTempPath="c:\temp\images" imageClearSelection="False"/>
    <ClassModelName name="Pipe" primaryField="ObjectID" fields="FacilityID,ObjectID,LastUser,NominalDiameter,PipeType" showImages="True" imagePrompt="True"
                    imageHeight="100" imageWidth="150" imageResolution="96" imageScale="1500" imageTempPath="c:\temp\images" imageClearSelection="True"/>
    <ClassModelName name="Regulator" primaryField="FacilityID" fields="FacilityID,ObjectID"  showImages="False" />
    <ClassModelName name="NonControllableFitting" primaryField="FacilityID" fields="FacilityID,ObjectID"  showImages="False" />
    <ClassModelName name="ServicePoint" primaryField="FacilityID" fields="FacilityID,ObjectID" showImages="False"  />
  </SelectionByModelNameReport>

Tuesday, August 30, 2011

Reminders

  1. Send Jason an invitation for the AAL demonstration for Middle Tennessee. 
  2. WebEx with Steve re Logica on August 31 8:30

JEA: AAL expression to show conductor size / conductor material

There's been more than one utility that was interested in showing related records that could be grouped.  The classic example being conductorInfo records being grouped by size and material.  JEA was asking about that today, and I worked up a screen-shot of a working expression that utilizes the new 10 syntax of allowing full on SQL expressions and also uses the conditional labeler.


SW Gas: What shape is a polygon anyway?

Well, I found out today that a polygon is NOT just an envelope.  I was trying to create a polygon from an envelope that I had, and that didn't work.  I guess this isn't too surprising.  You actually have to create a new Polygon class and populate it from the envelope.  I wrote some VBA code to test this.


Private Sub MakeIsoationPoly(env As IEnvelope, fc As IFeatureClass)
Dim app As IApplication
Set app = New AppRef
Dim edExt As IEditor
Set edExt = app.FindExtensionByName("ESRI OBJECT EDITOR")
edExt.StartOperation
Dim newFe As IFeature
Set newFe = fc.CreateFeature
Dim segCol As ISegmentCollection
Set segCol = New Polygon
Dim ln1 As ILine, ln2 As ILine, ln3 As ILine, ln4 As ILine
Set ln1 = New Line
Set ln2 = New Line
Set ln3 = New Line
Set ln4 = New Line
ln1.FromPoint = env.LowerLeft
ln1.ToPoint = env.LowerRight
ln2.FromPoint = env.LowerRight
ln2.ToPoint = env.UpperRight
ln3.FromPoint = env.UpperRight
ln3.ToPoint = env.UpperLeft
ln4.FromPoint = env.UpperLeft
ln4.ToPoint = env.LowerLeft
segCol.AddSegment ln1
segCol.AddSegment ln2
segCol.AddSegment ln3
segCol.AddSegment ln4

Set newFe.Shape = segCol
newFe.Store
edExt.StopOperation ("Make polygon")

End Sub

Monday, August 29, 2011

Isolation polygons for SW Gas benchmark

I worked with with Robert today to create the SW Gas Isolation polygon tool.  At the time of this writing, the tool is about 90% done, and Robert is adding the finishing touches. 

SUMMARY
The purpose of the tool is to create a new feature in a "IsolationPolygon" feature class based upon a selected set of features (as shown below). 
Ostensibly the selected set would be created by using the Gas Isolation Trace tool as shown above.  When you click on the ArcMap command, a new polygon is created based upon the geometry of the selected DistributionMain and ServicePipe features.  

ASSUMPTIONS
  • The user must be editing to use this tool
  • The user must have in his or her map at least three feature classes answering to the model names, DISTRIBUTIONMAIN, SERVICE, and ISOLATIONPOLYGON
OUTSTANDING ITEMS REMAINING (ROBERT M.)
  • Create a user interface so that the end user of the application can choose to have either a buffered polygon look (as shown above) or a rectangle representing the minimum bounding rectangle for the isolation polygon
    • The UI should include an ability to specify the buffer distance
  • Change the icon from the default bunny rabbit to something more appropriate. 
  • Modify the manner in which the selected set is retrieved to use Telvent.SE's methodology.  This will add in maintainability...
 Telvent.SE.Module.Elicitation.ObtainMapSelectionSet("modelName");



Friday, August 26, 2011

Telvent.SE.SpatialRelationshipAU


SUMMARY

Today Robert M. and I created a Special Autoupdater that is designed to migrate the attributes of a "spatially related" feature class to the feature being created or updated.  This was in support of the upcoming SW Gas benchmark. For example, lets say that I created a Drip Feature that intersects a Parcel feature and I want to migrate the value of the parcels "StreetName" field to the Drip's "StreetName" field.  This configurable autoupdater does just that. It works on points,lines, and polygon feature classes and should be able to handle migration between string and numeric data types.

The configuration file (Telvent.SE.SpatialRelationshipAU.XML) looks like this:

<Config>
  <MAP targetFeatureClass="Drip" spatialRel="Intersect" sourceFeatureClass="Parcel" sourceField="StreetName" targetField="StreetName" />
  <MAP targetFeatureClass="Drip" spatialRel="Within" sourceFeatureClass="StreetEdge" sourceField="Roads_ID" targetField="RoadID" />
  <MAP targetFeatureClass="StreetEdge" spatialRel="Cross" sourceFeatureClass="Parcel" sourceField="streetname" targetField="roads_id" />
</Config>

If you look at the last MAP in the config file (in blue), what is being said is that when the Autoupdater fires for a StreetEdge (on-create or on-update probably) look for the first parcel that it crosses and take it's streetname field and migrate it to the roads_id attribute of the street edge feature class.

Valid spatialRel values are (case sensitive): Intersect, Touch, Within, Contain, Cross, and Overlap.

Note that some behaviors may not be exactly what you expect...for example, a point that is snapped to a line does NOT touch the line...it is, however, within the line.

CONFIGURATION

To get this AU running, you'll need to RegEx the Telvent.SE.SpatialRelationshipAU.dll, edit the sample configuration file, and appropriately assign the AU to the feature class(es) that you want it to work on.  The name of the AU that you will see in ArcCatalog is: "Telvent.SE Inherit Spatial  Relationship Attributes".  It will appear only for Feature Classes - not object classes. 

ASSUMPTIONS

  • The target feature class name in the configuration file is the class to which the autoupdater is assigned.  This is the actual database name (not a model name)
  • The source feature class name is the feature class is to be searched.  IT MUST EXIST IN YOUR MAP.
  • The target fields and the source fields are numeric or string data types.  The two do not have to match, however if you are mapping a string field to a numeric field, the AU would of course only work if you had a string like "31".  A value like "Pine" can't be coerced into a number. 
  • The value from the first spatially related feature found are used.  If no related feature is found, then nothing should occur (the feature is created, and the value for the target field will be null). 
KNOWN ISSUES
  • We did run across some errors during testing when .Store() was called, but it seems very likely that this was an error raised by some external component.  The errors are caught by the AU and it seems to work.  At this point, it is just something to keep an eye on. 

Thursday, August 25, 2011

Tasks and completed assignments (TODO list)

COMPLETED

  1. Deliver power-point to Lane for Glendale detailing DMS functionality within AAL
  2. Find and deliver the Staking Cost Estimate report that Brooks wrote. 
  3. Get with Jessica to figure out how the SAM report needs to be queried for comments. Group by month or something. 
  4. SW Gas - Bug...get right-click context tool  (show on map) working for linear features
  5. SW Gas - Add support for images in Mail Merge document
  6. SW Gas - Created SW Gas QA rule to verify the necessity of an Excess Flow Valve. COMPLETED 9-22
  7. SW Gas - Make Model Name report roll up (collapsible regions in HTML)
  8. Glendale - Prepared and gave AAL demonstration.  Follow-up with power-point slides detailing DMS labeler. COMPLETE 9-22
  9. SW gas - Pipe system report isn't outputing Material, and the columns are therefore not getting put into the proper position...meaning that there should be four fields output, but only three are showing and in the wrong table column. Fixed
  10. SW Gas - Created Stored Trace tool. COMPLETE 9-21
  11. Middle Tennessee - Prepare and give AAL demonstration.  
  12. Glendale - Get AMI tools working - COMPLETED 9-12-11.  Note that the code for this is the Telvent.SE.AMIIntegrationAdvanced
  13. SW Gas - Modify Model Name report so that coded value descriptions from domains are used and not database values. COMPLETED 9-10-11
  14. SW Gas - Modify Customer report so that all customers and not just the first one for each service point are reportedComplete 9/10/11 - The issue was in the CMDGasCustomerReport.cs class.  I introduced code to loop through all of the CasCustomer Objects for each service point.  Look for //DKT 9-10-11 in code. Link here
  15. SW Gas - Modify model name report so that you can see images of the features in the reports. See post here.
  16. Create an Isolatable Polygon Map tool - The idea here is that we run a Gas Valve Isoation Trace and then based on the results, we turn that into a polygon which is used as the shape of a new named "IsolationPolygon" feature. The tool should allow for polygons to be created using both a buffer and a rectangular area. UPDATE - Nearing completion...see: http://devontaigtelvent.blogspot.com/2011/08/isolation-polygons-for-sw-gas-benchmark.html
  17. Create a new report which could integrate with the MMReports tool bar which provides a summary of connected objects.  The idea would be to inspect the selected set of objects, and then look for, by model name, "ControllableFitting", "Valve", "Pipe", "Regulator", "NonControllableFitting", and "ServicePoint".  The report should be in an HTML format and offer right-click functionality to zoom to individual features which are listed by FacilityID.  The report should be grouped by model name. Completed - Please see http://devontaigtelvent.blogspot.com/2011/08/sw-gas-select-by-model-name-report.html
  18. Modify Brook's Division Inheritance code so that lines, points, and polygons all work.  Currently it just works on points apparently.: Completed 8/26/11- I worked with Robert on this, and we actually decided to build an AU from scratch.  Please see the post on Telvent.SE.SpatialRelationshipAU
  19. Fix the MM Report Tools Mail Merge tool.  It doesn't bring up a word document: Completed 8/25/11- This simply worked on my machine.  Will try to deploy the latest .dll to Sean / Ryan / Neil. 
  20. Modfiy the MM Report Tools Gas Customer Report so that it inclues the total customers count:  Completed 8/25/11 - The number of customers (found by traversing the MeterSetting>ServiceAddress>CustomerInfo relationship is now passed as a parameter to the style sheet (search this blog for XSLT arguments for more detail). 

Tuesday, August 23, 2011

Oracle SQL Developer

Oracle SQL Developer is an alternative to the new web based interface for being able to explore a database. I think we used to call this "Management Studio" or something.   It has a pretty nice interface for being able to issue SQL statements, view tables and views, and create tables and the like. The standard web based interface (which I think is new with 11G) seems to not work if the IP address changes. Jen Baxter has more information on this.

Updating ArcSDE license

Ran across an interesting problem today when trying to view an Oracle database in ArcCatalog.  The error was something along the lines of ArcSDE not started on the server...Attempting to start the service revealed that the license was expired or not set for version 10. In order to update an ArcSDE license, you have to actually update an Oracle table (sde.server_config) and provide the new key.  This is the example that Jen Baxter sent me.


update sde.server_config set char_prop_value =

'arcsdeserver,100,ecp895569880,30-jun-

2012,ZZYTYXLPECJPA4S8A214' where

PROP_NAME='AUTH_KEY';

Don't forget to commit the transaction in Oracle.  You then need to (1) Restart Oracle and (2) Restart the ArcSDE service. That should allow you to then browse the database in ArcCatalog.

Monday, August 22, 2011

Scoring system for resume evaluation


Here's my 30 point scoring system to evaluate a resume.  Each category is worth various points (30 points possible).  Todd gets a 10.

- ArcGIS  (+1)
- ArcObject (+3)
- .NET (+5)
- General Programming (+3)
- SQL Server / Oracle (+2)
- ArcGIS Server (+4)
- Utility Experience (+2)
- Quality Education (+3)
- Work Experience (+3)
- General Web Experience (+3)
- Quality of Resume (+1)

Sales Engineering developer samples to Kim for ArcFM Resource Center documentation

I just made contact with Kim Despins about getting some of the Sales and Engineering developer samples included in the ArcFM Resource Center's Developer samples / documentation.  The zip / rar files are located at:

\\tntserver\users\SeanG

What I need to do for her is get the source code, and she'll try to compile and get running on ArcGIS 10. 

Update - Sent Kim a link to source code (under SeanG folder) for four of the requested samples. 

Thursday, August 4, 2011

Collapsible regions in HTML (from an XSLT transform)

There was an error in the manner in which Brooks code was creating collapsible regions within HTML.  This may apply to more than one project, but manifested for sure in the Telvent.SE.FiberCustomerReport.  The cause of the error was in the Javascript code which essentially hid ALL of the rows.  You don't want to do that, because if you do, then you won't be able to click on a row to get the region to reappear.  I have a nice working example here.   

Passing arguments to XSLT

I didn't know that you could pass arguments to XSL, but this article has a really good example: http://projects.ischool.washington.edu/tabrooks/545/ContentManagement/PassingParameters.htm  .  This could be useful to us, because often during a transformation we have to inject stuff into the XML (like today's date) in order for it to contain the data that we want.  In reality, that's not very clean since in a real environment, the XML might be furnished by a third party.  Better to pass such arguments to the stylesheet.

UPDATE - I put this to use in the Gas Customer Report.  The XSL stylesheet now accepts a parameter for the number of customers.  This was probably do-able in some other way (e.g. counting the Customer nodes), but it works and it is actually pretty easy. See the Telvent.SE.ReportTools.GasCustomerReport for details.

Tuesday, August 2, 2011

NTest and Fiber Customer Report


I've been looking into a problem that Neil reported yesterday about the NTest window in ArcMap not getting populated with the alarms that were being generated by the simulator executable. I found the code on Brook's old machine and now have it sort of working on my machine.  The solution includes two projects - Telvent.SE.ArcMapNTest and Telvent.SE.SimulateNTestRTU.  The simulator simply writes alarms events to a configurable database table when a button is clicked.  It doesn't seem like there is any problem there at all.  In the Telvent.SE.ArcMapNTest project, there are two command - CMDOpenManager (which launches a dockable window that is to contain the events sent to the database table from the simulator) and also CMDFiberCustomerReport.  On my machine when you click on the CMDOpenManager, it correctly docks and populates - on Neil's machine, it does not populate. Neil thinks this may be because he has another version of Telvent.SE.FiberTools.dll (which is apparently the location of an older / alternate version of the Customer Report).  The newer version of the report, which apparently has an XSL that allows for collapsible regions, is in the Telvent.SE.ArcMapNTest assembly.  The two customer reports can be distinguished by their bitmaps.  The old one is red and the new one is blue.
New bitmap for Customer Trace (called also from Right-click context of Alarms dockable window).

UPDATE - In Telvent.SE.ArcMapNTest the right-click context menu for launching to Customer report is actually using different code than what the button (command) does despite the fact that they are in the same project.  So in essence there are three copies of this Customer report - the first red one the Telvent.SE.FiberTools assembly, and the other two in the ArcMapNTest assembly. 

Friday, July 29, 2011

Cascading autoudpaters and timing

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.

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.

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).

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

SDE connection using an IP address

I was able connect to a remote machine using the following syntax (direct connect)

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
    {
    }


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