Assume I have two Named Selections that I want to use as scoping for a new Contact (one would be contact side, and the other the target side). How do I approach this using scripting?
You can use the following code:
nsContName = 'CONT_' nsTargName = 'TARG_' nsCont = DataModel.GetObjectsByName(nsContName)[0] nsTarg = DataModel.GetObjectsByName(nsTargName)[0] cGroup = DataModel.Project.Model.Connections.AddConnectionGroup() contactRegion = cGroup.AddContactRegion() contactRegion.SourceLocation = nsCont contactRegion.TargetLocation = nsTarg