Simlab Mesh Scripting
Skull
Altair Community Member
Hi,
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'/>\ <SupportEntities>\ <Entities>\ <Model>'+SurfaceBodyName+'</Model>\ <Body>'+EntitiesName29358+'</Body>\ </Entities>\ </SupportEntities>\ <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'/>\ <AdvancedOptions>\ <MeshDensity Value='0'/>\ <CreateVol Value='1'/>\ <Assembly Value='0'/>\ <PreserveFaceMesh Value='2'/>\ <MeshAsSingleBody Value='1'/>\ <Retain2DSurfaceBodies Value='0'/>\ <PreserveSurfaceSkew Value='55' Checked='0'/>\ </AdvancedOptions>\ </VolumeMesher>'; Simlab.Execute(SolidMesh);
How to use the variable in place of body names?
0
Answers
-
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.
0