|
POST
|
I'm having trouble setting the background color in ArcScene I can "set" the backroundcolor i.e. the message box reports it as being changed, but it doesn't change in the scene. The refreshviewers method refreshes the background to white, even though the default background is something different (150,0,150) In the GUI, this code does set the combobox background color to grey (128,128,128) but it doesn't apply. Code attached below. How do I get the background to change? Public Sub ChangeBackground()
Dim pSxDoc As ISxDocument
Set pSxDoc = ThisDocument
Dim pViews3d As IViewers3D
Set pViews3d = pSxDoc.Scene.SceneGraph
Dim r As Single
Dim g As Single
Dim b As Single
pViews3d.SetBackgroundColor 128, 128, 128
pViews3d.GetBackgroundColor r, g, b
MsgBox r & g & b
pViews3d.RefreshViewers
End Sub End Sub Cheers, Will Mostly you play with Scene ..if you want to change and once you run the code... go scene properties and press Restore Default colors Public Sub test() Dim pSxDoc As ISxDocument Set pSxDoc = ThisDocument Dim pViews3d As IViewers3D Set pViews3d = pSxDoc.Scene.SceneGraph Dim r As Single Dim g As Single Dim b As Single pViews3d.Scene.SetDefaultBackgroundColor 128, 128, 128 pViews3d.RefreshViewers pViews3d.GetAllViewers End Sub
... View more
02-14-2011
07:11 PM
|
0
|
0
|
533
|
|
POST
|
Hi all I just installed Visaul Studio 2008 and ArcGIS Server 9.3 and I do not see anywhere the Visual Studio's New Project ArcgIs Visual studio installed templates please advise http://resources.esri.com/help/9.3/ArcGISDesktop/dotnet/ec9c3bf9-1bae-4d56-9ae6-e439dbd0f18f.htm
... View more
02-14-2011
06:48 PM
|
0
|
0
|
722
|
|
POST
|
Hello, Is there a proper way to close an SDE connection or just let the IWorkspace garbage collected by .NET. What we have is an IWorkspace to an SDE that we start and edit session, made some edits, stopped the operation, stopped edit session. At this point should we issue another command to close the IWorkspace? Currently, in our Oracle database the SDE.states table grows by one record for every edit session that is opened and these records stay after the edit session is stopped. Thanks, Vu Its not like normal database.. something like close and open the connection..once done with start and stop edit sessions ... that is done..
... View more
02-14-2011
06:46 PM
|
0
|
0
|
1272
|
|
POST
|
Yes, that's right. But I get an error. I have two windows forms: frmMap.cs and frmToc.cs There is no connection between MapControl and TocControl. Code in frmToc.cs ends in an error, because I cannot reference the axMapControl1 object. this.axTOCControl1.SetBuddyControl(......); Is there a solution for this problem? Thank you. Hey, You should not use two windows forms.. you should use only use one windows form ..and you need to add the controls..then you will get those...if not then tell me your task...
... View more
02-14-2011
02:50 AM
|
0
|
0
|
1604
|
|
POST
|
Really? I can't find such a property on the map class. I'm using 9.3.1 http://help.arcgis.com/en/sdk/10.0/serveradf_net/componenthelp/000m/000m00001p40000000.htm
... View more
02-14-2011
02:47 AM
|
0
|
0
|
555
|
|
POST
|
Hi, How can I change the backgroundcolor of the map? I found the IMapDescriptor interface but how can I obtain a reference to this for a given map/dataframe? TIA You can use Map class..which has property called Backcolor...
... View more
02-14-2011
01:36 AM
|
0
|
0
|
555
|
|
POST
|
Hi, I have an MXD that I would like to publish to an ArcGIS server using C# ArcObjects (preferably as an MSD). I have been unable to find anything regarding this. Essentially I would like to implement the following ArcPy code in ArcObjects: arcpy.mapping.ConvertToMSD() arcpy.mapping.PublishMSDToServer() Any help would be appreciated! Thanks! There are very less chance to do that.. I dont think it might happen...
... View more
02-14-2011
01:27 AM
|
0
|
0
|
1289
|
|
POST
|
Hi, I try to explain it. I have ArcGIS Engine 2010 Developer Kit and VS2010. The goal is to create an application with ArcGIS Engine. This application consists of several windows forms elements. And in these elements the different Controls were placed. My questions: How works the communication between these separate forms? Is it possible? The BuddyControl only finds connections in the same Windows Form (default case, find in ESRI help). Can you help me, please? Thank you. That is what... like you suppose to install Arc Engine runtime.. if you want to use arc engine control on windows form...if you installed arcengine runtime..controls will be integrating with VS.net...namespace will be integrated with VS.net framework..Something like Cristal reports controls ..etc.. Licence control will be playing as key for Licences.. and BudyControl depends on parent control.. something like if map control and Toc control... Map control will playing role as buddycotnrol for TocControl....
... View more
02-14-2011
01:17 AM
|
0
|
0
|
1604
|
|
POST
|
can anyone pls tell me how to convert shape file into cad programmetically through c# thanks in advance some how You can use ExportCAD from ESRI.ArcGIS.ConversionTools Namespace
... View more
02-14-2011
12:58 AM
|
0
|
0
|
347
|
|
POST
|
Hello, I'm new in ArcGIS Engine an C# Development. Is it possible to connect ArcGIS Controls (TocControl, MapControl, ToolbarControl,...) in different windows form elements? All Controls in one windows form it is easy with the help of the BuddyControl (Esri-Help). How can I solve this problem? What happens with the LicenceControl? Thank you very much! HI, I dont know what exactly you are looking for .. as per my understanding... You need to have arcgis engine runtime if you want to use arcgis engine controls.. on windows form...if you dont have arcgis engine not installed in you computer ... You will get licence error....Now tell me what you are looking for..
... View more
02-14-2011
12:29 AM
|
0
|
0
|
1604
|
|
POST
|
Hi all, The docs for IGraphicTracker.SetTransparency include the line "This is used only in 2D mode and only if the graphic's symbol supports ISymbolEffects", which is all well and good except ISymbolEffects...doesn't seem to exist. ESRI's search engine turns up nothing, and Google only returns links to the API reference for .SetTransparency. Using .SetTransparency in code doesn't seem to do anything. Does anyone know: a) if this interface actually exists, or b) it's possible to use transparency in the GraphicTracker, and if so....how? cheers, Paul You might need to play with symbol...if you want to get transparency .. public IGraphicTracker m_graphicTracker = null; private void CreateGTSymbols() { if (m_graphicTracker == null) return; //1st point symbol IColor color = new RgbColorClass() { Red = 0, Green = 0, Blue = 255 }; stdole.IFontDisp symbolFont = new stdole.StdFontClass() as stdole.IFontDisp; symbolFont.Name = "ESRI Default Marker"; ICharacterMarkerSymbol characterMarkerSymbol = new CharacterMarkerSymbolClass(); characterMarkerSymbol.Font = symbolFont; characterMarkerSymbol.Color = color; characterMarkerSymbol.CharacterIndex = 111; characterMarkerSymbol.Size = 20.0; IGraphicTrackerSymbol gtSymbol1 = m_graphicTracker.CreateSymbol(characterMarkerSymbol as ISymbol, null); m_GTSymbols.Add(0, gtSymbol1); }
... View more
02-07-2011
11:11 PM
|
0
|
0
|
843
|
|
POST
|
Dear all, I have two polygon feature classes, polygon A and polygon B. I would like to write a VBA to perform a select by location function to find out which polygon(s) in polygon B is/are intersect with a selected polygon in polygon A which is selected by a user. I know, I can use "ISpatialFilter" to do this, but don't know how to implement it in VBA. Would you mind provide some sample code/hints for me ? Regards Gary public IFeatureCursor GetStreetsInEnvelope(IFeatureClass featureClass) { // Create the envelope and define its position. IEnvelope envelope = new EnvelopeClass(); envelope.PutCoords(-84.4078, 33.7787, -84.3856, 33.7997); // Create the spatial filter and set its spatial constraints. ISpatialFilter spatialFilter = new SpatialFilterClass(); spatialFilter.Geometry = envelope; spatialFilter.GeometryField = featureClass.ShapeFieldName; spatialFilter.SpatialRel = esriSpatialRelEnum.esriSpatialRelIntersects; // Set the attribute constraints and subfields. // We want to exclude ramps, highways and interstates. spatialFilter.WhereClause = "NAME <> 'Ramp' AND PRE_TYPE NOT IN ('Hwy', 'I')"; spatialFilter.SubFields = "NAME, TYPE"; // Execute the query. IFeatureCursor featureCursor = featureClass.Search(spatialFilter, true); return featureCursor; }
... View more
02-07-2011
06:56 PM
|
0
|
0
|
1257
|
|
POST
|
Does anyone know the difference "ESRI.ArcGIS.System" and "ESRI.ArcGIS.esriSystem" ? ESRI.ArcGIS.System :- The System library is the lowest level library in the ArcGIS architecture. The library contains components that expose services used by the other libraries composing ArcGIS. ESRI.ArcGIS.esriSystem :- The Display library contains the components that support drawing symbology to an output device. Screen displays, symbols, colors and feedback objects, along with their supporting objects are all defined in the library.
... View more
02-07-2011
06:48 PM
|
0
|
0
|
1823
|
|
POST
|
I've tried that and I get two errors. FeatureClassNameClass has no constructors defined and Interop type FeatureClassNameClass cannot be embedded so use the applicable interface instead. Neil's suggestion makes sense although I still don't understand why FeatureClassName has no constructors defined. I'll try to see if I can use Dataset.FullName instead. Hi, IFeatureClass is an interface.. http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#/IFeatureClassName_Interface/0025000002s3000000/ FeatureClassName is coclass..its a creatable class.. http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#/FeatureClassNameClass_Class/0025000000ms000000/ Something like this... IFeatureClass inFeatureClass = (IFeatureClass)lName.Open(); IFeatureClassName inFeatureClassName = (IFeatureClassName)lName; IFeatureClassName outFeatureClassName = new FeatureClassNameClass(); IDatasetName outDatasetName = (IDatasetName)outFeatureClassName; IDataset outWorkspaceDataset = (IDataset)outWorkspace; IWorkspaceName outWorkspaceName = (IWorkspaceName)outWorkspaceDataset.FullName; outDatasetName.WorkspaceName = outWorkspaceName;
... View more
02-07-2011
06:42 PM
|
0
|
0
|
1499
|
|
POST
|
In my C# console application I tried using the below line of code to declare a IFeatureClassName object but Visual Studio 2010 says that FeatureClassNameClass() has No Constructors defined. What?? IFeatureClassName pOutFeatClassName = (IFeatureClassName)new FeatureClassNameClass(); Also If I changed my code to the below line of code Visual Studio will not show any errors on the syntax but when I start debugging my application and I reach this line, Visual Studio throws a crazy error stating something like "error on vshost32.. and just stops debugging IFeatureClassName pOutFeatClassName = (IFeatureClassName)new FeatureClassName(); Does anyone have any suggestions for me? Thanks Use something like below IFeatureClassName pOutFeatClassName = new FeatureClassNameClass();
... View more
02-04-2011
02:55 AM
|
0
|
0
|
1499
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-09-2017 07:44 AM | |
| 2 | 01-12-2015 10:36 PM | |
| 1 | 01-15-2015 09:02 AM | |
| 2 | 09-29-2014 02:29 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|