The Connections
object provides an API for the
Connections tree object.
To access the Connections
object:
connections = Model.Connections
The Connections
object exposes several convenient methods
for adding connections. For example, you can add a beam or set the contact type to
frictionless on one of the model's contact regions:
beam = connections.AddBeam() contact_region = connections.Children[0].Children[0] contact_region.ContactType = ContactType.Frictionless
Beam
objects require a valid scoping. You can satisfy this
requirement by setting the appropriate property. For a beam, you set the
ReferenceLocation
and
MobileLocation
properties:
reference_scoping = ExtAPI.SelectionManager.CreateSelectionInfo(SelectionTypeEnum.GeometryEntities) reference_scoping.Ids = [110] beam.ReferenceLocation = reference_scoping mobile_scoping = ExtAPI.SelectionManager.CreateSelectionInfo(SelectionTypeEnum.GeometryEntities) mobile_scoping.Ids = [38] beam.MobileLocation = mobile_scoping
For the above beam, accessible properties include:
beam.ReferenceBehavior = LoadBehavior.Deformable beam.ReferencePinballRegion = Quantity("0.001 [m]") beam.Radius = Quantity("0.005 [m]") beam.MobileZCoordinate = Quantity("6.5E-03 [m]") beam.MobilePinballRegion = Quantity("0.001 [m]")