POST
|
1) Your app isn't "interacting with the current instance of ArcGIS". Creating a new MxDocumentClass instance triggers the creation of a new ArcMap application instance, it doesn't cause it to link to an already running instance. Perhaps this is what you meant, just wanted to clarify. 2) In theory you'd expect that starting an instance of ArcMap should trigger ArcMap to check out the appropriate license; however, you may need to check out the appropriate license in your app before you can use the API. Worth trying. 3) If all you want to do is do automated plotting using one of the Export*Classes you may want to use the ArcEngine controls instead i.e. create a C# Form that hosts an ESRI.ArcGIS.Controls.AxPageLayoutControl. You can create the form hidden and then use the page layout control to generate the export files. Much lighter weight solution than starting and trying to automate ArcMap.
... View more
03-10-2017
12:40 PM
|
2
|
0
|
257
|
POST
|
The easiest way is using IFeatureEdit.MoveSet(). Likewise for rotations, use IFeatureEdit.RotateSet(). The issue, as you've seen, is that the anno shape is just the bounding polygon. This is true for both anno text and anno used to store graphics. The actual text/graphic is stored in the element blob field. So either use the *Set() methods, or move the polygon and element separately. e.g. var fedit = feature as IFeatureEdit; var set = new SetClass(); set.Add(fedit); var vector = new LineClass(); vector.FromPoint = ...; vector.ToPoint = ...; fedit.MoveSet(set, vector);
... View more
02-09-2017
08:57 AM
|
1
|
1
|
437
|
POST
|
Create your own GxFilter and assign to IGxDialog.ObjectFilter. Suggest deriving from GxFilterWorkspacesClass and just overriding CanDisplayObject method. e.g. something like: [ComVisible(true)]
[Guid("...")]
[ProgId("GxFilterSDEWorkspaces.Class")]
public class GxFilterSDEWorkspacesClass :
global::ESRI.ArcGIS.Catalog.GxFilterWorkspacesClass
{
public GxFilterSDEWorkspacesClass() : base()
{
}
//---------------------------------------------------------------------
public override bool CanDisplayObject( IGxObject OBJECT )
{
var d = base.CanDisplayObject(OBJECT);
if( !d || !OBJECT.IsValid ) return false;
if( OBJECT.Category.EqualsI("Folder") ) return true;
var db = OBJECT as IGxDatabase;
if( db == null ) return false;
var ws = db.Workspace;
if( ws == null ||
ws.Type != esriWorkspaceType.esriRemoteDatabaseWorkspace ||
!ws.PathName.EndsWithI(".sde")
) return false;
return true;
}
//---------------------------------------------------------------------
// to avoid compile errors, must override ALL base COM methods.
//---------------------------------------------------------------------
public override string Description {
get { return base.Description; }
}
public override string Name {
get { return base.Name; }
}
public override bool CanChooseObject( IGxObject OBJECT, ref esriDoubleClickResult RESULT )
{
return base.CanChooseObject(OBJECT, ref RESULT);
}
public override bool CanSaveObject( IGxObject LOCATION, string NEWOBJECTNAME, ref bool OBJECTALREADYEXISTS )
{
return base.CanSaveObject(LOCATION, NEWOBJECTNAME, ref OBJECTALREADYEXISTS);
}
} They will still see all the normal top-level folders GxDialog has, but they will only be able to see and pick connections backed by an .sde file.
... View more
08-03-2016
10:15 PM
|
0
|
0
|
341
|
POST
|
Like just about everything else, there is a COM category for that. You have possibly 3 or more choices of how to get the extensions: 1) If you have ArcFM installed you can use MMCategoryFactoryClass which will allow you iterate through the extension GUIDs, or create instances of the extensions and get the names from the instances. 2) Use the rather limited ArcObjects CategoryFactoryClass to create instances of the extensions, and get the names from the instances. 3) Drop down to .NET or Win32 and query directly e.g. Using the COM Component Categories Manager in .NET - CodeProject
... View more
07-29-2015
02:33 PM
|
2
|
1
|
679
|
POST
|
Haven't tried it, but what about the StyleGallery ? e.g. ... var mxDocument = application.Document as IMxDocument; var styleGallery = mxDocument.StyleGallery; styleGallery.LoadStyle(filename, null); or, var styleGalleryStorage = mxDocument.StyleGallery as IStyleGalleryStorage; styleGalleryStorage.AddFile(filename); See: ArcObjects 10 .NET SDK Help - IStyleGallery ArcObjects 10 .NET SDK Help - IStyleGalleryStorage
... View more
04-30-2015
01:52 PM
|
0
|
1
|
348
|
POST
|
You're still creating then throwing away the second instance. Change:: ITextSymbol pTextSymbol = new TextSymbolClass(); pTextSymbol = pMask as ITextSymbol; To: ITextSymbol pTextSymbol = pMask as ITextSymbol;
... View more
04-23-2015
04:21 PM
|
0
|
0
|
439
|
POST
|
You are creating two TextSymbols, setting the color on the second, then throwing the second away with: pTextSymbol = pMask as ITextSymbol;
... View more
04-22-2015
08:58 PM
|
1
|
2
|
439
|
POST
|
We have a similar case, a single dll w/ a form that hosts several engine controls. The dev with the engine dev license can setup the form in the Visual Studio dialog editor, other dev's can't. However, all dev's can compile the dll, even if they don't have an engine dev license.
... View more
04-15-2015
12:50 PM
|
1
|
0
|
214
|
POST
|
Yes, you would need access to the database. I usually have full access to a development copy of a clients database. My current client uses Oracle, so I use sqldeveloper to do these kind of queries. SQL Server should be similar. File GDB, not sure, but obviously you'd have to run the query via AO e.g. qd = IFeatureWorkspace.CreateQueryDef, set qd properties, then qd.Evaluate to get the results cursor.
... View more
03-10-2015
07:27 PM
|
0
|
0
|
2707
|
POST
|
For ArcGIS 10 the location of the CLSID config info has moved. See: How-To - ArcFM - How to Get Object Type GUIDs i... | exchange
... View more
03-10-2015
12:05 PM
|
0
|
2
|
2707
|
POST
|
The 1352 error, to me, suggests that maybe you've only converted some of the classes in the network from ArcFM to ArcGIS i.e. you converted the conductor but not the Fault Indicator ? You may have to map all features in the network from their ArcFM class to their ArcGIS counterpart. When you create/convert the feature class to be used in a geometric network you specify if it's simple _or_ complex. All rows in the given feature class are then of the specified type e.g. can't create a simple edge feature class and have some of its rows behave as complex. As such, it's important that you map the ArcFM class to the correct ArcGIS one i.e. simple to simple, complex to complex. ... I haven't done this, but have you tried using the ArcCatalog network dataset context menu option "ArcFM Solution Object Converter" and selecting "Convert to use ESRI Objects" ? I've only used it the other way, convert ESRI to ArcFM, but I believe it's supposed to do exactly what you are trying to do ... sorry, reread original post, seems issue is you don't have ArcFM installed on your machine. Can you get the client to do this on a copy of the DB and have them provide that to you ? I'm afraid I've only used C/C++ and C# arcobjects API's, not Java. It looks like IFeatureClassProxy is Java only. I assume it's analogous to IFeatureClass. I'm not sure why getEXTCLSID would return null unless there isn't actually an extension registered with the class. Check the SDE.GDB_OBJECTCLASSES table to see what the CLSID and EXTCLSID's are so you know if it's your code or not. I would not suggest editing the values directly in that table ... but then again it might work.
... View more
03-09-2015
10:37 PM
|
0
|
3
|
2707
|
POST
|
... so I think your on the right track. 1) Get the existing CLSID for the class 2) Null out the class extension. 3) Map the old ArcFM CLSID to the new ArcGIS one: mmGeoDatabase.MMArcFMObject -> esriGeoDatabase.Object [basically: mmGeoDatabase.MMArcFM* -> esriGeoDatabase.*] mmGeoDatabase.MMArcFMAnnotationFeature Class -> esriGeoDatabase.Feature mmGeoDatabase.MMArcFMDimensionFeature Class -> esriGeoDatabase.???
... View more
03-09-2015
12:09 PM
|
0
|
5
|
2707
|
POST
|
IClass Interface EXTCLSID - the extension class ID Extension - the instance (returns object, need to cast to appropriate interface) ExtensionProperties - properties to alter the extension behaviour, specific to the instance IClassSchemaEdit and IClassSchemaEdit2 - alter the class extension for a given table. I think your original question was clear. The concern is you've done the obvious thing, change the class extension, and are still having issues. That's non-standard enough that I'm not sure anyone would have tried that before. If you look at the MM class extensions you se they do have edge and junction specific ones which suggests there may be deeper ties than just the class extension: So, you've nulled out the class extension and changes the class type from the ArcFM one to the appropriate ArcGIS one. Did you set it to the correct ArcGIS one i.e. Object, Feature, Edge, or Junction ? From your original post it looks like you set to Feature when you may need to set to either Simple or ComplexEdgeFeature.
... View more
03-09-2015
11:55 AM
|
0
|
6
|
2707
|
POST
|
ToolbarPalette CoClass ? Not the same interface, but similar functionality.
... View more
02-04-2015
06:06 PM
|
0
|
0
|
213
|
Title | Kudos | Posted |
---|---|---|
1 | 04-22-2015 08:58 PM | |
1 | 04-15-2015 12:50 PM | |
2 | 03-10-2017 12:40 PM | |
1 | 02-09-2017 08:57 AM | |
2 | 07-29-2015 02:33 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|