Select to view content in your preferred language

When changing a parameter in a custom tool, don't clear other parameters

03-22-2023 11:20 PM
Status: Open
Labels (1)
Honored Contributor

ArcGIS Pro 3.1

I'm using a custom script tool that was provided by @SeanLim and @DanLee called Shrink Line: 
Shrink Lines — GP Tool

In the tool parameters, if I change the Input Feature Class, then it automatically clears a parameter called Percentage/Length.


Automatically resetting parameters isn't the desired behavior. If I took the time to enter some parameter values, then I'd prefer them to persist, even if I change one of the other parameters.

Could that behavior be changed?



Hi @Bud, I can't seem to reproduce this issue. I've updated the Shrink Line tool as stated in my other comment.

Could you try again with the updated tool and let me know if it's still reproducible?


@SeanLim I tried again with the updated tool. I'm still seeing that behavior in this scenario: 

  1. Choose an Input Feature Class.
  2. Choose the Method (optional).
  3. Enter a Percentage or Length value.
  4. Click in the Output Feature Class parameter (it's a habit I have where I "click away" to ensure the value I entered persists).
    1. Note that "clicking away" in blank space in the tool seems to behave differently. It doesn't cause the issue.
  5. Change the Input Feature Class to a different feature class.
  6. Result:
    The Percentage/Length value has be cleared to 0, which isn't what we want.




It looks like this behavior happens when you click the Output Features Class input box before changing the Input Feature Class. You can see that it doesn't happen when I click outside of the box after entering the Percentage input then going straight to changing the Input Feature Class value. I'm not sure why it does that, but I would avoid that pattern so you don't lose your other input values.

Edit: this is a known bug that is being worked on!