Extent of Simlab
I want to rename a no. of bodies to a defined name after I import the parasolid into Simlab 14.1. And I am trying to automate the process.
For example, right now what i can do is change the name of 'Body 2' to 'xyz' through scripts. What i want is to get this input from user, like select the body to rename it to 'xyz'.
Is this possible in Simlab through the method of JScripts ?
Answers
-
I think you have to get names of bodies, and show them in a listview, then you can pick one to rename
but I don't know how to do that by JScripts.
0 -
-
Altair Forum User said:
So i can get the input from user, prompt the userto select which body he wants to rename.
0 -
Yes it will prompt.
0 -
Altair Forum User said:
Yes it will prompt.
Also. Lets take a basic example. There is a cube. And i want to fix one side of the cube. And i have to repeat this task for many cubes with different sizes.
So is it possible in simlab that the simlab detects the face to be fixed automatically by giving something to the software to detect the face.
Also can you help me out with the way by which simlab number the different faces while importing parasolid. Or the process is random.
0 -
Altair Forum User said:
Yes it will prompt.
are you talking about creating the groups and prompting the user to select bodies to be part of that group.
Can i do this without creating groups?
0 -
Altair Forum User said:
are you talking about creating the groups and prompting the user to select bodies to be part of that group.
Can i do this without creating groups?
It is must to have group for this case.
0 -
Altair Forum User said:
Also. Lets take a basic example. There is a cube. And i want to fix one side of the cube. And i have to repeat this task for many cubes with different sizes.
So is it possible in simlab that the simlab detects the face to be fixed automatically by giving something to the software to detect the face.
Also can you help me out with the way by which simlab number the different faces while importing parasolid. Or the process is random.
You can use transfer groups here. Numbering of faces can be done internally by software.So it random.
Create group for in the cube (CAD)
Mesh it.
Transfer the groups to the Mesh body
If you give the Same group name for different cubes you can easily script this.
0 -
Altair Forum User said:
You can use transfer groups here. Numbering of faces can be done internally by software.So it random.
Create group for in the cube (CAD)
Mesh it.
Transfer the groups to the Mesh body
If you give the Same group name for different cubes you can easily script this.
You are getting, what i am trying to do.
Let me try to tell you it in this way,
Suppose i want to make a script, in which. When the user selects a body. A message box pops up stating the name of the body. Is this possible in simlab?
0 -
Altair Forum User said:
You can use transfer groups here. Numbering of faces can be done internally by software.So it random.
Create group for in the cube (CAD)
Mesh it.
Transfer the groups to the Mesh body
If you give the Same group name for different cubes you can easily script this.
I want to get the name of the body selected by the user in a variable , is this possible in simlab ?
Like when i select a body , The body ID and body name is shown in the output tab. So can i store that value in a variable ?
0 -
Altair Forum User said:
You can use transfer groups here. Numbering of faces can be done internally by software.So it random.
Create group for in the cube (CAD)
Mesh it.
Transfer the groups to the Mesh body
If you give the Same group name for different cubes you can easily script this.
any help Rahul?
0 -
Altair Forum User said:
Like when i select a body , The body ID and body name is shown in the output tab. So can i store that value in a variable ?
Hi,
You can store the body name as parameters with the type as 'String'.
var Mname = SimLabUtility.GetStringParameter('$ModelName')
Once you have set is as a parameter , you can directly call the above function, the body name is stored in 'Mname' variable. The supporting file is present in SimLab help.
When you are working on different cubes , upfront you set it as string parameter , you can make it work for different scripts.
For creation of parameters you can go to option Project > Parameters , and set the values there. Attached screenshot for reference.
Thanks
Siddharth
0