|
POST
|
Did you try using it in conjunction with IFeatureclassLoad and ISchemaLock? http://edndoc.esri.com/arcobjects/9.2/ComponentHelp/esriGeoDatabase/IFeatureClassLoad_Example.htm
... View more
06-16-2010
08:26 AM
|
0
|
0
|
1406
|
|
POST
|
Did you look at IApplicationStatus.Initialized ? Maybe that is false when called the first time. Also, you might consider deploying it as a JITExtension. http://edndoc.esri.com/arcobjects/9.2/NET/06b87b98-6477-4036-85f3-ef27caa00bb0.htm#JIT
... View more
06-14-2010
02:03 PM
|
0
|
0
|
644
|
|
POST
|
If you show a form every time you catch an exception in the Enabled getter, arcmap can become unwieldy. To avoid seeing a messagebox every 400 millisecs, set the extension to null the first time the exception is caught. untested code:
private IExtensionConfig m_MyExtension;
public override void OnCreate(object hook)
{
if (hook == null)
return;
m_application = hook as IApplication;
if (m_application != null)
{
m_MyExtension = m_application.FindExtensionByName("My Extension") as IExtensionConfig;
}
}
public override bool Enabled
{
get
{
bool enabled = false;
try
{
if (m_MyExtension != null
&& m_MyExtension.State == esriExtensionState.esriESEnabled)
enabled = AMethodThatMightThrowAnException();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message + Environment.NewLine + ex.StackTrace);
m_MyExtension = null;
}
return enabled;
}
}
... View more
06-14-2010
12:57 PM
|
0
|
0
|
1665
|
|
POST
|
are you doing your inserts between IEditor.StartOperation and IEditor.StopOperation?
... View more
06-14-2010
07:02 AM
|
0
|
0
|
768
|
|
POST
|
Unhandled exceptions in the Enabled getter can be a real pain. I'd recommend a try/catch, and call the FindExtension in OnCreate. The enabled would return false if the extension reference is null.
... View more
06-14-2010
06:14 AM
|
0
|
0
|
1665
|
|
POST
|
I'd try IDisplayTransformation.TransformCoords for this. Call it twice, first using the IActiveView of the map to get into device coords, then using the IActiveView of the pagelayout to go from device coords into page coords (even though page coords are treated as "map" coords when looking at the args).
... View more
06-10-2010
12:42 PM
|
0
|
0
|
705
|
|
POST
|
when you say " without opening the mxd in ArcMap", do you mean you are using ArcEngine? cast the pagelayout to IActiveView, then pass the mouse X/Y to IActiveView.ScreenDisplay.DisplayTransformation.ToMapPoint Even though the method says "ToMapPoint", the resulting point should be in page coordinates.
... View more
06-10-2010
10:28 AM
|
0
|
0
|
705
|
|
POST
|
Did you try checking to see if IField.getVarType() returns vbNull ?
... View more
06-04-2010
08:42 AM
|
0
|
0
|
774
|
|
POST
|
I've proposed this idea. Go here to vote for it. The new ESRI support forums are not as good as the old forums. http://forums.arcgis.com/ I think ESRI should set up the forums as a Stack Exchange based site. http://blog.stackoverflow.com/2010/04/changes-to-stack-exchange/ StackOverflow is a good example ... http://stackoverflow.com/
... View more
06-02-2010
10:51 AM
|
0
|
0
|
1240
|
|
POST
|
try this (VBE is documented somewhere at Microsoft) Option Explicit
Sub TestModExists()
Debug.Print ModExists("ArcID")
Debug.Print ModExists("xxx")
End Sub
Function ModExists(name As String) As Boolean
ModExists = False
Dim pVBE As VBIDE.VBE
Set pVBE = Application.VBE
Dim l As Long
For l = 1 To pVBE.VBProjects.Count
Dim k As Long
For k = 1 To pVBE.VBProjects(l).VBComponents.Count
If pVBE.VBProjects(l).VBComponents(k).Type = vbext_ct_StdModule Then
Dim s As String
s = UCase(pVBE.VBProjects.Item(l).VBComponents(k).name)
If s = UCase(name) Then
ModExists = True
Exit Function
End If
End If
Next k
Next l
End Function
... View more
06-02-2010
05:38 AM
|
0
|
0
|
833
|
|
POST
|
On some systems "Scale" is not a legal field name ... try commenting out that line.
... View more
05-28-2010
05:39 AM
|
0
|
0
|
1988
|
|
POST
|
Hey Keith - Looks like IGpDescribeData might do this, but I don't see any documentation for the GpDescribeData object they mention. Maybe IGpUtilities3.Open* would return something that implements IGpDescribeData. (Just a guess.)
... View more
05-26-2010
06:24 AM
|
0
|
0
|
325
|
|
POST
|
try adding "ref" if GP.Exists(@"\\cakotrm3\\Users\AHCP_Roads\Road Assessment\CA_RAD.gdb\site",ref object)
do_something();
... View more
05-25-2010
12:46 PM
|
0
|
0
|
547
|
|
POST
|
If you are able to create a topology and have both featureclasses participate, then it would not be that hard to code this.
// pseudocode
// Make a list of points common to both
List<Point> myPoints = new List<Point>();
For each node in ITopologyGraphNodes
parent1count = 0
parent2count = 0
For each parent in node.parents
if parent.m_pfC.Alias == "MyPointFeatureclass" then
parent1count++;
else if parent.m_FC.Alias == "MyLineFeatureclass" then
parent2count++;
next parent
if parent1Count > 0 and parent2Count > 0 then
List.Add((IPoint)node.Geometry);
next node
// write each point in List to featureclass.
foreach point in List
Write point to output featureclass
next point
... View more
05-21-2010
03:00 PM
|
0
|
0
|
493
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-17-2015 10:41 AM | |
| 2 | 11-15-2012 05:22 AM | |
| 4 | 09-29-2011 08:20 AM | |
| 3 | 12-04-2015 08:50 AM | |
| 1 | 04-08-2010 09:34 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:22 AM
|