Ansys Learning Forum Forums Discuss Simulation General Mechanical How prevent script abortion Reply To: How prevent script abortion

Chandra Sekaran
Ansys Employee

You can use *GET command to get a list of component names and then compare against that list. Something along this line.

*get,ncomp,comp,,ncomp  ! get number of components in your model

*dim,names,string,80,ncomp   ! create a string array that can have up to 80 characters

*do,i,1,ncomp,1

*get,names(1,i),comp,i,name

*enddo

Then in a loop check your component name against this list?

Â