|
POST
|
pre-process the string. i think "'" has to be escaped with another "'". var str = "This has an embedded ' in it";
var strEscaped = str.Replace("'", "''");
qf.WhereClause = $"......'{strEscaped}'";
... View more
05-01-2025
10:45 AM
|
3
|
0
|
557
|
|
POST
|
sounds like u need Geometry.Engine.Difference https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic8216.html
... View more
04-08-2025
11:25 AM
|
1
|
0
|
734
|
|
POST
|
Thanks for bringing it to our attention. We will add this at 3.6. U can set the order field via the CIM but I suspect the symbology UI could get out of sync, especially if it were open.
... View more
04-03-2025
03:38 PM
|
1
|
0
|
402
|
|
POST
|
there's a lot to unpack here. To reference any property or method on any class at compile time u must have a reference to the assembly that defines "that class" in your .csproj (unless u r using reflection which i assume u r not). Without a reference to "that" particular addin assembly in the "other" addin .csproj (which would be strange but there is nothing to prevent it) then references to classes or properties within it in your source code would never compile. If you _do_ add a reference to another addin assembly to your addin then the usual rules of .NET will apply - any objects sharing the same name within the scope of a given method or routine would end up needing to be fully-qualified to avoid naming collisions and the compiler will prompt u as such when u attempt to compile.. There is no concept of a "global variable" within Pro at runtime. U can, however, always access running instances of particular objects instantiated by the Framework via the various FrameworkApplication.FindModule, GetPluginWrapper, FrameworkApplication.DockPaneManager.Find(...) calls but u wld still need references to the various assemblies to reference public content (assuming u were not using reflection) unless they were defined on the base "Contract" classes they inherit from @RichardDaniels wrote: I've been developing several add-ins (6 at this count) and loading them into a custom tab. In a few cases I've taken one add-in and Forked it and to create a new add-in with similar functionality. Is there a risk doing this? For example: (1) if I have a public variable within one add-in, is it visible from other add-ins, (2) if I had a public class could another add-in access that class 'across' add-ins, and (3) if I had two public variables, or classes, in two add-ins with the same names could there be a Collision resulting in an error in one or more of the add-ins? Other way to ask this this, are add-ins thread safe containers?
... View more
03-20-2025
05:56 PM
|
1
|
1
|
640
|
|
POST
|
The fastest way is via a recycling rowcursor with specific fields identified in the SubFields clause. Using the ObjectIDs property rather than a where clause is, imo, more convenient and may be marginally faster. Your mileage may vary. A non-recycling row cursor will, of course, be slower. WRT Inspector - it is typically used with your UIs for purposes of editing - and comes with a built-in attribute grid [accessed via Inspector.CreateEmbeddableControl()] it populates for exactly that purpose. Data in the inspector is always read-write (unless restricted via a join or similar). Inspector will always automatically retrieve all attributes from a feature layer or feature class. Additionally, If loading data (from a feature layer) with joins, then all joined attribute values are loaded also. Inspector handles subtypes and domains and related default values. You can find more info/details here: https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-Editing
... View more
02-27-2025
02:48 PM
|
0
|
1
|
974
|
|
POST
|
Going strictly off the error message, make you are returning a valid "System.Windows.Visibility" enum value from your converter....assuming u are referring to it somewhere in one of your bindings. Note, binding errors are also notorious for being red herrings....the issue cld simply be somewhere in your dockpane logic. namespace System.Windows { // // Summary: // Specifies the display state of an element. public enum Visibility : byte { // // Summary: // Display the element. Visible = 0, // // Summary: // Do not display the element, but reserve space for the element in layout. Hidden = 1, // // Summary: // Do not display the element, and do not reserve space for it in layout. Collapsed = 2 } }
... View more
02-12-2025
08:55 AM
|
0
|
0
|
399
|
|
POST
|
sorry, yes, i see that u did mention that in your description....am I understanding correctly that you want _two_ cursors? One is being used in "our application's stereo view" and the other, if such could be created, would be " a new tool cursor to mirror those mouse movements in Pro? - is that right? So, Im not entirely sure but I dont think multiple cursors is supported in Windows out of the box....u wld need a 3rd party solution I am thinking. I did a quick google on "can you have two cursors on one computer" but didnt get any concrete results...
... View more
01-15-2025
05:40 PM
|
0
|
1
|
1355
|
|
POST
|
https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic24525.html 3.4 and 3.3
... View more
01-15-2025
02:05 PM
|
1
|
1
|
1369
|
|
POST
|
binding errors like those usually come from the vs designer attempting to load a/the control into the VS designer UI. they are not compilation errors as such which is why the addin compiles and runs ok. I wonder if your issue might be related to this post: https://developercommunity.visualstudio.com/t/Update-to-Version-1780-causes-error-T/10519868 fyi - I think u can modify what gets output here (if u wanted to): https://stackoverflow.com/questions/62838824/how-to-send-databinding-errors-to-visual-studios-output-window
... View more
01-03-2025
12:09 PM
|
0
|
0
|
826
|
|
POST
|
Mody, buttons cannot be hidden on the ribbon - only disabled. However, it is possible to delete buttons from the daml via a Configuration at start up. There is a callback u can override in the ConfigurationManager class called "OnUpdateDatabase". In many of the samples (and in many demos we have done) we show deleting many of the Pro tabs - u wld apply the same logic to delete buttons. For example: https://github.com/Esri/arcgis-pro-sdk-community-samples/blob/master/Configuration/ConfigWithMap/ConfigurationManagerWIthMap.cs#L98-L132 Here are the key lines: //here is where the tab elements are selected
var tabElements = from seg in database.Root.Descendants(nsp + "tab") select seg;
//In your case u wld be selecting buttons - eg
var buttonElements = from seg in database.Root.Descendants(nsp + "button") select seg; Then, in a loop, the sample examines each tab element (probably around 100 or so). It skips any of its own tabs (tab ids beginning with "ConfigWithMap" or "Acme" and any on the backstage). It adds all of the other tab elements into a collection where they will be deleted. if (... tabElement.Parent.Name.LocalName.StartsWith("backstage"))
continue;//keep backstage tabs
//delete all tabs other than "our" own
if (!id.Value.StartsWith("Acme") && !id.Value.StartsWith("ConfigWithMap"))
elements.Add(tabElement);//any tab added here will be deleted
//u wld do similar logic to delete buttons
if (id.Value == "some_button_daml_id_which_I_want_to_delete_off_the_ribbon")
elements.Add(btnElement); The tabs are deleted in a separate loop here: foreach (var element in elements){
element.Remove();//delete all the tabs (or buttons in your case)
} (fyi - attempting to delete them within the same loop as the search will throw an exception) Read more about configurations here: https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Configurations
... View more
01-03-2025
11:40 AM
|
0
|
0
|
591
|
|
POST
|
Here are two ways to do it. One uses an event which keeps the button and edit box loosely coupled, the other uses a direct reference where the button updates the edit box directly. The loosely coupled is the most flexible but is a bit more work than simply updating the edit box text - and, if that is literally all u need, then its overkill.
public class DateTimeStringChangedEventArgs : EventBase
{
public string OldDateTimeString { get; private set; }
public string NewDateTimeString { get; private set; }
public DateTimeStringChangedEventArgs(string oldDateTimeString, string newDateTimeString)
{
OldDateTimeString = oldDateTimeString;
NewDateTimeString = newDateTimeString;
}
}
public class DateTimeStringChangedEvent :
CompositePresentationEvent<DateTimeStringChangedEventArgs>
{
public static SubscriptionToken Subscribe(
Action<DateTimeStringChangedEventArgs> action, bool keepSubscriberReferenceAlive = false)
{
return FrameworkApplication.EventAggregator.GetEvent<DateTimeStringChangedEvent>()
.Register(action, keepSubscriberReferenceAlive);
}
public static void Unsubscribe(Action<DateTimeStringChangedEventArgs> subscriber)
{
FrameworkApplication.EventAggregator.GetEvent<DateTimeStringChangedEvent>()
.Unregister(subscriber);
}
public static void Unsubscribe(SubscriptionToken token)
{
FrameworkApplication.EventAggregator.GetEvent<DateTimeStringChangedEvent>()
.Unregister(token);
}
internal static void Publish(DateTimeStringChangedEventArgs payload)
{
FrameworkApplication.EventAggregator.GetEvent<DateTimeStringChangedEvent>()
.Broadcast(payload);
}
}
internal class Module1 : Module
{
private static Module1 _this = null;
private string _dateTimeString =
DateTime.Now.ToString("G", CultureInfo.CurrentCulture);
public string DateTimeString
{
get
{
return _dateTimeString;
}
set
{
var args = new DateTimeStringChangedEventArgs(
_dateTimeString, value);
_dateTimeString = value;
//Raise the event
DateTimeStringChangedEvent.Publish(args);
}
}
public EditBoxDirectApproach EditBoxDirectApproach { get; set; } = null;
...
}
internal class Button1 : Button
{
protected override void OnClick()
{
var date_string = DateTime.Now.ToString("G", CultureInfo.CurrentCulture);
//Indirect, loose-coupling
Module1.Current.DateTimeString = date_string;
//Direct, direct-coupled
Module1.Current.EditBoxDirectApproach.Text = date_string;
}
}
internal class EditBoxIndirectApproach : EditBox
{
public EditBoxIndirectApproach()
{
Initialize();
}
private bool _ignoreEvents = false;
private void Initialize()
{
//This will invoke OnTextChange which is ok
//as we havent subscribed to the event yet
this.Text = Module1.Current.DateTimeString;
DateTimeStringChangedEvent.Subscribe((args) =>
{
_ignoreEvents = true;
try
{
//Invokes OnTextChange
this.Text = args.NewDateTimeString;
}
finally
{
_ignoreEvents = false;
}
});
}
protected override void OnTextChange(string text)
{
//prevent (infinite) recursion
if (_ignoreEvents)
return;
Module1.Current.DateTimeString = text;
base.OnTextChange(text);
}
}
internal class EditBoxDirectApproach : EditBox
{
public EditBoxDirectApproach()
{
Module1.Current.EditBoxDirectApproach = this;
this.Text = DateTime.Now.ToString("G", CultureInfo.CurrentCulture);
}
}
... View more
12-12-2024
04:19 PM
|
2
|
0
|
510
|
|
POST
|
3.1.3 was .NET 6. he will need to recompile against the .3.1 assemblies.
... View more
12-04-2024
08:53 AM
|
0
|
1
|
774
|
|
POST
|
I suspect that because u r setting the fill transparent it (ie the selection symbol) isnt giving u an appropriate contrast to the "underlying" feature symbol (of the selected feature) with just the highlight being applied to the feature boundary...
CIMFill transpFill = SymbolFactory.Instance.ConstructSolidFill(CIMColor.NoColor());
I think, at this juncture, it is trial and error w/ the selection symbol to get the effect u r looking for. As far as your code goes, it all looks correct to me.
p.s. I have never used UseSelectionSymbol but, given the name of the property, I wld expect it to have to be "true".
... View more
12-04-2024
08:50 AM
|
0
|
3
|
949
|
|
POST
|
https://github.com/esri/arcgis-pro-sdk/wiki/ProSnippets-GeometryEngine#scale-a-geometry
... View more
12-04-2024
08:36 AM
|
0
|
1
|
1171
|
|
POST
|
I think this is what u r running into:
https://community.esri.com/t5/arcgis-pro-sdk-questions/color-transparency-problem-in-arcgis-pro-3-4-when/m-p/1558573#M12298
I'll ask the Pro team if we can get a KB posted.
... View more
12-03-2024
02:26 PM
|
0
|
0
|
614
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | a week ago | |
| 1 | a week ago | |
| 2 | 12-17-2025 11:33 AM | |
| 1 | 12-17-2025 01:16 PM | |
| 1 | 10-14-2025 05:01 PM |
| Online Status |
Offline
|
| Date Last Visited |
yesterday
|