I have a named selection "block 1a" and would like to use it as the scoping method in a new remote point which will then be duplicated to make a spring. I currently cannot added the name selection as the location. Is it easier to convert to a ID or use a differnt method to get the location ?
model = ExtAPI.DataModel.Project.Model
named_selection = ExtAPI.DataModel
NS1 = named_selection.GetObjectsByName("block 1a")
rp_1 = model.RemotePoints.AddRemotePoint()
rp_1.Name = "test_1"
rp_1.ScopingMethod = GeometryDefineByType.Component
rp_1.Location = NS1
rp_2 = rp_1.Duplicate()
rp_2.Name = "test_2"
rp_2.ZCoordinate = Quantity(-2, "m")
rp_2.Behavior = LoadBehavior.Rigid
spring = model.Connections.AddSpring()
spring.RenameBasedOnDefinition()
spring.Name="Test Block"
spring.LongitudinalStiffness = Quantity(1, "N m^-1")
spring.ReferenceScopeLocation = rp_1
spring.MobileScopeLocation = rp_2