I try to define a script in order to assing at each task the object contained on the same floor. i have this information in the UFV of each object and i create a task for all floors.
I tried with :
TASK (NAME =="Pareti Cores") ASSIGN_OBJECT (VAR RESOURCES( NAME ==UFV("IfcBuildingStorey")))
but it doesn't run.
Synchro has a built-in tool for automatching, so there is no need to use Script to do this. See the attached PDF for the full description of this tool. Automatching is available in the Assign Resources ribbon.
Depending on how you set up your model and schedule, there are many ways to create Auto matching rules. For your example if you have Activity Codes for BuildingStorey assigned to tasks, you could select all "Pareti Cores" tasks and all Resources that fall in that category, then create a rule that matches the Tasks Activity Code Value for BuildingStorey to the Resource User Field Value IfcBuildingStorey.
Alternatively, you could assign a Task User Field for Building Storey instead of an Activity Code and match by Task UF instead.
Or if you assign another User Field to the Resources that match the Task Name, you could assign objects to multiple kinds of tasks all at once