CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Structural Mechanics

Ansys Workbench: Named Selection Python Script

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 23, 2021, 12:29
Default Ansys Workbench: Named Selection Python Script
  #1
New Member
 
Falko Kunze
Join Date: Nov 2012
Location: Dahlum, Germany
Posts: 3
Rep Power: 13
hatchet is on a distinguished road
Hi



I´m trying to write a python script for set up Named Selection in Ansys Mechanical

My first try is the following short script:

sel=DataModel.Project.Model.AddNamedSelection()

sel.ScopingMethod=GeometryDefineByType.Worksheet

sel.Name="Groove Edges"

CRC=sel.GenerationCriteria

CRC.Add(None)

CRC[0]=Ansys.ACT.Automation.Mechanical.NamedSelectionCri terion()

CRC[0].Action=SelectionActionType.Add

CRC[0].EntityType=SelectionType.GeoEdge

CRC[0].Criterion=SelectionCriterionType.NamedSelection

CRC[0].Operator=SelectionOperatorType.Equal

CRC[0].Value=ExtAPI.DataModel.Project.Model.NamedSelecti ons.Children[3]

sel.Generate()



It generate a new Named Selection from the NS list.

But I want to set the value to a name like "NS_Edge_groove_01".





Can someone help?
hatchet is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[General] Custom viewpoint selection within python script John_P ParaView 1 November 3, 2021 01:28
[ANSYS Meshing] Named Selection Script Skadi ANSYS Meshing & Geometry 1 September 12, 2021 15:08
Near wall treatment in k-omega SST Arnoldinho OpenFOAM Running, Solving & CFD 38 March 8, 2017 13:48
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 18:57
Macro command combatibility ANSYS workbench Tassos CFX 6 January 13, 2014 04:19


All times are GMT -4. The time now is 00:34.