Jump to content

Recommended Posts


I was trying to script meshing of bodies with a common sub-string in their names.


I can use the below utility. But I cant figure out, how to use the variable in solid meshing syntax?


Simlab Utility - 

var SubString1=["Bolt*"];

             var EntitiesName29358=[];

            SimLabUtility.GetBodiesWithSubString(SurfaceBodyName, SubString1,             EntitiesName29358);

Solid Meshing Code - I am trying something like this, but this doesnt works.

//SurfaceBodyName is a variable storing model name
var SolidMesh=' <VolumeMesher UUID="83822e68-12bb-43b9-b2ac-77e0b9ea5149">\
  <tag Value="-1"/>\
  <Name Value="VolumeMesher1"/>\
  <MeshType Value="Tet10"/>\
  <AverageElemSize Value="3.5"/>\
  <MaxElemSize Value="Default" Checked="0"/>\
  <InternalGrading Value="2"/>\
  <MinQuality Value="0.07"/>\
  <LinearQuality Value="2"/>\
  <MaxQuality Value="1"/>\
  <QuadMinQuality Value="0.001"/>\
  <QuadQuality Value="0"/>\
  <QuadMaxQuality Value="1"/>\
  <CadBody Value="0"/>\
   <MeshDensity Value="0"/>\
   <CreateVol Value="1"/>\
   <Assembly Value="0"/>\
   <PreserveFaceMesh Value="2"/>\
   <MeshAsSingleBody Value="1"/>\
   <Retain2DSurfaceBodies Value="0"/>\
   <PreserveSurfaceSkew Value="55" Checked="0"/>\



How to use the variable in place of body names?

Share this post

Link to post
Share on other sites

hi, your syntax is correct. your function is working for me.  Let me know what error you are getting in project log file. I am suspecting there is some problem in getting fem model name to perform solid mesh. 


Please check the sample script attached here, that works fine for me. 


Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...