Adding the count of two or more featuresets
I have queried multiple services and obtained the count for each result with featureset.features.count . My question is what would be the correct syntax for adding the count from each featureset to get the total sum? I have stored each featureset.features.count result in seperate variables of type double. I then created an empty variable of type double to hold the sum. I then used an assign task to say varSum=varFeatureSetCount1 + varFeatureSetCount2 . Finally I am just trying to display this value as a string in an alert or display form. I am getting an Object reference not set to an instance of an object error when I try to alert varSum.ToString. Does anyone know how I can accomplish this? Thanks in advance.
0
-
Thanks for the reply Marshall. I was setting the default value of the variable varFeatureSetCount to be featureset.features.count in the variable properties window instead of using an Assign Task to say varFeatureSetCount=featureset.features.count. I'm not sure why setting the value in the variable properties window was throwing the error, but the Assign Task was definitely the way to go for assigning the count value to that variable. Thanks for helping me to get that working. 0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar