Schneider Electric GIS Tech Support

Forum discussion for Schneider Electric GIS products, including ArcFM, ArcFM Viewer, Designer, Responder, and others.
It is currently Tue May 21, 2013 7:17 pm

All times are UTC - 7 hours [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Work Request/Design objects in .NET
PostPosted: Thu Oct 21, 2010 3:09 pm 
Offline

Joined: Fri Jul 13, 2007 5:11 pm
Posts: 8
We are upgrading our Designer customizations from VB6 to C#.Net, and are experiencing the anomalies described below:

In the Design tab, clicking on the Work Request (top level node) does not display the Work Request attributes. Also, it does not initiate Work Request polygon placement.
We have exactly the same issue with the Design node.

More details:
1. The Target tab and the Selection tab behave normally.
2. The existing Work Request and Design features can be selected and viewed in Selection tab as usual.
3. The Design polygon can be added by using Editor Tools, but there is no link between the Design node in the Design tab and the new Design polygon.
4. We can install all electric features, and the Work Location features are created in the map and in Design tree correctly.
5. We compared the design XML created by the VB6 codes and the .Net codes and couldn’t find any irregularities.
6. We also created a Design on a machine which has the VB6 custom codes installed and opened this Design on the machine which has the .Net codes installed. We experience the same problem.
7. We created another Design on a machine which has the VB6 application and place the work request polygon and the Design polygon on the map. Then we opened this Design on the machine with the .Net codes, and both Design and Work request polygons are linked to their corresponding nodes in the design tree correctly, and their attributes is displayed on the Design tab attributes (everything seems right).

It is like some event perhaps is not being captured or is handled differently in .NET.

We are using ArcGIS 9.3 SP1, ArcFM 9.3 SP1, and C#.Net 2008 (development environment).


Top
 Profile  
 
 Post subject: Re: Work Request/Design objects in .NET
PostPosted: Fri Oct 22, 2010 8:52 am 
Offline
Telvent North America Rep
User avatar

Joined: Wed Aug 18, 2010 4:09 pm
Posts: 108
Location: Fort Collins, Colorado
what events are you listening for, and do you use static .NET methods? Static .NET methods can run on their own thread and sometimes this causes problems with event propagation...


Top
 Profile  
 
 Post subject: Re: Work Request/Design objects in .NET
PostPosted: Fri Oct 22, 2010 12:28 pm 
Offline

Joined: Fri Jul 13, 2007 5:11 pm
Posts: 8
There is an event that should be fire when a user clicks on the work request node on the Design tree which populates the work request attributes and prompt user to draw the work request on the map.

Our custom codes in both environments (VB6 and C#) do not listen or do anything with this event (so this is, to us, out of the box ArcFM functionality).

Here is the method we use to create/open a Design:

internal static bool OpenDesign( int lDesignID)
{
//Some codes to create Design XML or read an existing design XML from the designs table as string (sTemp)

pListTreeAsXml.set_ListTreeAsXML(null, sTemp);

//some codes
}

The whole method works fine and the Design XMLs generated by both environment are the same, but we have the earlier described issues with the .Net codes. We think there might be a problem with using Miner.Interops in ArcFM 9.3 SP1 envirnment (just a guess).

It looks to us, at this point, that the problem is with the code that runs on the event that fires when the Work Request node in the Design Tree.


Top
 Profile  
 
 Post subject: Re: Work Request/Design objects in .NET
PostPosted: Fri Oct 22, 2010 2:53 pm 
Offline
Telvent North America Rep
User avatar

Joined: Wed Aug 18, 2010 4:09 pm
Posts: 108
Location: Fort Collins, Colorado
Well...it's hard to diagnose here, it's probably going to need to be setup by a support technician. My experience has been pretty heavy with .NET, interop, VB, COM and we've encountered a few places where threading and .NET static methods created unpredictable and unreliable code paths. It was odd too...because *sometimes* it would work, and other times it would fail.

What we ended up doing in those cases was making sure our .NET objects were created on the COM STA thread. There are some sophisticated ways of doing this, but there are also some pretty simple ones. What we did was create our .NET objects in the Startup of an IExtensions, and initialized our statics there. We also stopped stamping everything as static - that is, static methods, static classes, static classes with static methods - they lead to trouble when you realize that static initializers in .NET can be created on a separate thread quite easily, and more importantly unbeknown to the developer.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 7 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group