def test_copy_paste_ids(self): vsp.VSPRenew() vsp.ClearVSPModel() prop_id1 = vsp.AddGeom("PROP") vsp.Update() vsp.CopyGeomToClipboard(prop_id1) prop_id2 = vsp.PasteGeomClipboard() self.assertTrue(prop_id1 != prop_id2[0])
# Change Finess Ratio vsp.SetParmVal(pod_id, "FineRatio", "Design", 10.0) # Change Y Location y_loc_id = vsp.GetParm(pod_id, "Y_Location", "XForm") vsp.SetParmVal(y_loc_id, 1.0) # Change X Location vsp.SetParmVal(pod_id, "X_Location", "XForm", 3.0) # Change Symmetry sym_flag_id = vsp.GetParm(pod_id, "Sym_Planar_Flag", "Sym") vsp.SetParmVal(sym_flag_id, vsp.SYM_XZ) # Copy Pod Geom vsp.CopyGeomToClipboard(pod_id) vsp.PasteGeomClipboard(fuse_id) # make fuse parent # Set Name vsp.SetGeomName(pod_id, "Original_Pod") second_pod_id = vsp.FindGeom("Pod", 0) # Change Location and Symmetry vsp.SetParmVal(second_pod_id, "Sym_Planar_Flag", "Sym", 0) vsp.SetParmVal(second_pod_id, "Y_Location", "XForm", 0.0) vsp.SetParmVal(second_pod_id, "Z_Location", "XForm", 1.0) fname = "apitest1.vsp3" vsp.WriteVSPFile(fname)