|
POST
|
Wolfgang Kaiser This works well as a button but how do I set it as a property? I attempted to set it as below: public string _paneWidth = base.Content.ActualWidth.ToString();
public string PaneWidth
{
get { return _paneWidth; }
set
{
SetProperty(ref _paneWidth, value, () => PaneWidth);
}
} But I get the error "keyword base is not available in the current context"
... View more
08-05-2020
02:15 PM
|
0
|
2
|
2321
|
|
POST
|
Thanks for the response. I would rather use the MVVM pattern and avoid code behind.
... View more
08-05-2020
11:27 AM
|
0
|
0
|
2321
|
|
POST
|
I was hoping to take advantage of the pre-existing functionality of the GoToXY tool like panning, zooming,etc. If I use the samples you provided, I would have to write that functionality from scratch....?
... View more
08-03-2020
10:45 AM
|
0
|
0
|
905
|
|
POST
|
I am accessing and executing the GoToXY tool but I cannot find any methods in the api that allow me to set the default latitude and longitude. On the click of a button, I want the GoToXY control to open with preset latitude and longitude values. I thought that maybe the lat and long would be children of the wrapper but when I accessed the children property of the plugin wrapper, it returned an empty list. Uma Harano Wolfgang Kaiser protected override void OnClick()
{
var commandId = "esri_mapping_gotoXYControl";
var iCommand = FrameworkApplication.GetPlugInWrapper(commandId) as ICommand;
if (iCommand != null)
{
// Let ArcGIS Pro do the work for us
if (iCommand.CanExecute(null))
{
iCommand.Execute(null);
}
}
}
... View more
07-24-2020
01:25 PM
|
0
|
2
|
966
|
|
POST
|
Yes. My problem is that I need to know the width of the dockpane so that I can set the margin/horizontal offset value. This way, the tooltip always appears just to the right of the dockpane even if it gets resized by the user.
... View more
07-23-2020
10:42 AM
|
0
|
0
|
2321
|
|
POST
|
I have created help content for input parameters on a dockpane which shows up when the user hovers over the info icon to the left of the input parameter as a tooltip. I would like for the tooltip to show up not on the dockpane but to the right of the dockpane. I figured the best way to achieve this would be to set the HorizontalOffset of the tooltip to the width of the dockpane. To achieve this, I need to know the width of the user's dockpane. I figured it would be best to dynamically retrieve the width of the dockpane and use that as the HorizontalOffset of the tooltip. So how do I access the width of a dockpane. I checked the 'pane' help but it has no width property. Uma Harano Wolfgang Kaiser
... View more
07-17-2020
02:28 PM
|
0
|
9
|
2459
|
|
POST
|
I have searched high and low but I cannot find samples that show how to create tool help for a custom tool's input nd output parameters. The required functionality is similar to the 'i' that shows up to the left of the parameters on Geoprocessing tools which when clicked on, shows the tool help for a given parameter. Uma Harano Wolfgang Kaiser
... View more
07-16-2020
02:11 PM
|
0
|
1
|
544
|
|
POST
|
I also tried running it with the code below to ensure that the linear units show up as feet instead of foot. templateFile=arcpy.GetParameterAsText(0)
if templateFile != "":
sr_object=arcpy.Describe(templateFile).spatialreference
units=""
if sr_object.linearUnitCode==9002:
units="Feet"
else:
units=sr_object.linearUnitName
arcpy.env.MTolerance=sr_object.MTolerance
arcpy.env.MResolution=sr_object.MResolution
arcpy.env.XYTolerance="{0} {1}".format(sr_object.XYTolerance,units)
arcpy.env.XYResolution="{0} {1}".format(sr_object.XYResolution,units)
arcpy.AddMessage(arcpy.env.MTolerance)
arcpy.AddMessage(arcpy.env.MResolution)
arcpy.AddMessage(arcpy.env.XYTolerance)
arcpy.AddMessage(arcpy.env.XYResolution)
arcpy.FeatureClassToFeatureClass_conversion("Mylayer","//Path//to//gdb", "OutLayer") The AddMessage results then were: 6.213699494949262e-07
6.213699494949262e-08
0.003280839895013 Feet
0.0010763910416709318 Feet This didn't make a difference in the behaviour of the script. It's still pretty erratic. It doesn't work 99% of the time and then it will randomly work out of the blue with no changes to the code.
... View more
06-08-2020
01:51 PM
|
0
|
0
|
1943
|
|
POST
|
Here are the AddMessage results: 6.213699494949262e-07
6.213699494949262e-08
0.003280839895013 Foot
0.0010763910416709318 Foot But when I look at the properties of the output, it has different values from above.
... View more
06-08-2020
01:40 PM
|
0
|
1
|
1943
|
|
POST
|
I tried setting the environments as you did above but they are still not applied to the output files.
... View more
06-08-2020
11:51 AM
|
0
|
4
|
1943
|
|
POST
|
I have a template file from which I am retrieving tolerance and resolution settings as in the code below. Using arcpy.AddMessage, I am able to confirm that the settings were retrieved from the template file and applied. I then run FeatureClassToFeatureClass in a bid to have the newly set tolerance and resolution values applied to the output feature class. Unfortunately, these settings are not applied to the output file. When I run this same code in the python window, the settings are applied as expected. I am using ArcGIS Pro 2.5.1. Dan Patterson templateFile=arcpy.GetParameterAsText(0)
if templateFile != "":
sr_object=arcpy.Describe(templateFile).spatialreference
arcpy.env.MTolerance=sr_object.MTolerance
arcpy.env.MResolution=sr_object.MResolution
arcpy.env.XYTolerance="{0} {1}".format(sr_object.XYTolerance,sr_object.linearUnitName)
arcpy.env.XYResolution="{0} {1}".format(sr_object.XYResolution,sr_object.linearUnitName)
arcpy.AddMessage(arcpy.env.MTolerance)
arcpy.AddMessage(arcpy.env.MResolution)
arcpy.AddMessage(arcpy.env.XYTolerance)
arcpy.AddMessage(arcpy.env.XYResolution)
arcpy.FeatureClassToFeatureClass_conversion("Mylayer","//Path//to//gdb", "OutLayer")
... View more
06-05-2020
11:49 AM
|
0
|
8
|
2044
|
|
POST
|
It looks like while saving to memory, the environment settings aren't applied. When I saved my outputs to a file gdb, the resolution and tolerance were set as expected. I however, would still appreciate any insight into the issue of the spatial reference object having the MTolerance property but not the MResolution property.
... View more
06-01-2020
12:15 PM
|
0
|
0
|
1292
|
|
POST
|
Thanks Uma Harano. I was able to retrieve the tolerance and resolution values. I am attempting to use those tolerance and resolution values and apply them to a feature class that is created by the create routes tool like below: double xyResolution = -1;
double xyTolerance = -1;
double mTolerance = -1;
await QueuedTask.Run(() =>
{
var sr_Template = TemplateLayer.GetSpatialReference();
xyResolution = sr_Template.XYResolution;
xyTolerance = sr_Template.XYTolerance;
mTolerance = sr_Template.MTolerance;
});
var environments = Geoprocessing.MakeEnvironmentArray(XYResolution: xyResolution, XYTolerance: xyTolerance, MTolerance: mTolerance);
await Geoprocessing.ExecuteToolAsync("CreateRoutes_lr", Geoprocessing.MakeValueArray(infc, "Name", "memory\\routes", "LENGTH", "#", "#", "LOWER_LEFT", 1.89393939393939E-04, 0, false, true),environments,null,null, GPExecuteToolFlags.AddOutputsToMap); When I scrutinize the output file 'routes' however, the tolerance and resolution values are not applied. The output file has completely different values than the ones assigned by environments. Do you know what could be causing this issue? The other issue is that the spatial reference object has the MTolerance but I am unable to locate the MResolution among the properties. The layer properties shown in the image in the original question does show the MResolution. Am I missing something?
... View more
05-28-2020
12:07 PM
|
0
|
2
|
1292
|
|
POST
|
How can I access the resolution and tolerance of a layer as shown in the image below? Wolfgang KaiserUma Harano
... View more
05-27-2020
01:53 PM
|
0
|
4
|
1390
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-12-2021 01:43 PM | |
| 1 | 04-12-2021 02:29 PM | |
| 1 | 08-26-2019 01:13 PM | |
| 1 | 04-13-2021 10:11 AM | |
| 2 | 04-14-2021 11:01 AM |
| Online Status |
Offline
|
| Date Last Visited |
12-13-2021
12:15 PM
|