Add point mass to a particular named selection with details such as coordinates and mass.
Hey, you can use the attached script to do this
def AddMass(mass_value, mass_name, named_selection_name, x_loc, y_loc, z_loc): """ Adds a point mass at a specific location and scopes it to a named selection. Parameters: mass_value (float): The mass value in lbm (pounds mass). mass_name (str): The name to assign to the point mass. named_selection_name (str): The name of the named selection to scope the mass to. x_loc (float): X-coordinate in inches. y_loc (float): Y-coordinate in inches. z_loc (float): Z-coordinate in inches. """ # Access the model geometry geometry = Model.Geometry # Add a point mass point_mass = geometry.AddPointMass() # Name the point mass based on the mass_name parameter point_mass.Name = mass_name # Set mass value and coordinates point_mass.Mass = Quantity(mass_value, "lbm") point_mass.XCoordinate = Quantity(x_loc, "in") point_mass.YCoordinate = Quantity(y_loc, "in") point_mass.ZCoordinate = Quantity(z_loc, "in") # Scope the mass to a named selection named_selection = DataModel.GetObjectsByName(named_selection_name) point_mass.Location = named_selection[0] # Ensure the correct named selection is used AddMass(1,'mass b','Selection 2',1,1,1) AddMass(1,'mass v','456',1,1,1)