CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > Siemens > STAR-CCM+

CCM+ Simulation Assistant - Selection in Object Tree

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 17, 2018, 12:43
Default SOLVED *** CCM+ Simulation Assistant - Selection in Object Tree
  #1
New Member
 
Join Date: Jun 2017
Posts: 11
Rep Power: 9
lee_2017 is on a distinguished road
Dear Members,

I am creating a simulation assistant in ccm+ and I would like to select the object (part, region, face, etc) in the tree, click on the link in the simulation assistant and get the name and the type of object which I selected in the tree. Does anyone of you know, if that is possible and how?

Example shown in the picture:
1. Click on the part / region / face etc.
2. Click on the link to execute the macro


Wanted result: selected object is a part and the name is "f_fRohr"


Thank you for you help!
Attached Images
File Type: png Example.png (9.5 KB, 26 views)

Last edited by lee_2017; December 18, 2018 at 09:56. Reason: Solved
lee_2017 is offline   Reply With Quote

Old   December 18, 2018, 09:56
Default Solution
  #2
New Member
 
Join Date: Jun 2017
Posts: 11
Rep Power: 9
lee_2017 is on a distinguished road
Dear members,
I got the solution by myself and just wanted to share it.

Code:
public void getTreeSelection(){
     for (Node n : getSelectedNodes()) {
           String name = n.getDisplayName();
           Class className = n.getClass();            
     }
}
lee_2017 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
[ANSYS Meshing] Script Connection Friction arpeedesign ANSYS Meshing & Geometry 4 April 11, 2019 09:17
Problem in3D model processing mebinitap OpenFOAM 2 December 12, 2014 05:40
CPU selection (E5-2650) for CFD simulation songxguan Hardware 2 October 23, 2012 17:09
CFD-analysis of hydroplane: STAR CCM or Flow Simulation? peterg07 Main CFD Forum 0 February 7, 2010 15:32
Simulation of object in rotation Dothan FLUENT 4 March 25, 2008 04:25


All times are GMT -4. The time now is 12:46.