Select to view content in your preferred language

Moving two geometries with one constraint rule

577
4
Jump to solution
02-20-2023 08:16 AM
EmelineDedroog
Emerging Contributor

Hi,

I have a constraint rule on a point layer (hypernode) which is supposed to stay on a polygon layer (site_manoeuvre) :


//get the feature geometry
var g1 = Geometry($feature)
//get the object id
var siteMan = $feature.s_site_man
//get the entire class
var fsSiteMan_mv = FeatureSetByName($datastore, "dma_test.dma_owner.site_manoeuvre_mv", ['s_historic'], true)
//get the feature joined to the hypernode
var Poly = Filter(fsSiteMan_mv, "s_historic = @siteMan")
var touche = Touches(g1, Geometry(f))
return count(touche) == 1

My rule run pretty well but when I try to move my polygon with the point together, it returns false. 
I suppose it is because "FeatureSetByName" took the "old" geometry of the polygon.
Can somebody have an idea on what I can do?

@HusseinNasser2 

0 Kudos
1 Solution

Accepted Solutions
MikeMillerGIS
Esri Frequent Contributor

Each edit is processed independently.  So if you move both together, the first one will be processed with its attribute rules, before the next edit is preformed.

View solution in original post

4 Replies
MikeMillerGIS
Esri Frequent Contributor

Each edit is processed independently.  So if you move both together, the first one will be processed with its attribute rules, before the next edit is preformed.

EmelineDedroog
Emerging Contributor

Yes so it's not possible to work as I want with attributes rules on the two feature class. 

Is it possible to check if another object is moving "at the same time"?

0 Kudos
MikeMillerGIS
Esri Frequent Contributor

As far as I know, no.

0 Kudos