Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.
構造全般

構造全般

すべてのボディに対して名前選択を作成するスクリプト例

    • FAQFAQ
      Participant

      以下のようなスクリプトで可能です。 selmgr=ExtAPI.SelectionManager selmgr.ClearSelection() selInfo=ExtAPI.SelectionManager.CreateSelectionInfo(SelectionTypeEnum.GeometryEntities) bodies = DataModel.GetObjectsByType(DataModelObjectCategory.Body) with Transaction(): for body in bodies: selInfo.Entities = [body.GetGeoBody()] selmgr.AddSelection(selInfo) Model.AddNamedSelection() selmgr.ClearSelection() print “Done with macro, Create a NS with %s selections” % (len(bodies))