forked from bguest/ansys-macros
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ATTMESH.mac
52 lines (46 loc) · 1.28 KB
/
ATTMESH.mac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
!&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
! ATTMESH.mac
! B.Guest - benguest@gmail.com
! DESCRIPTION: This model meshes an area based on aatt
! PRECONDITIONS:
! ARG1: Type of Mesh: 'kp','line','area','volu'
! ARG2: Element Type Number
! ARG3: Material Number
! ARG4: First Thing (-1 implies all slected things)
! ARG5: Last Thing
! ARG6: Thing Increment
! ARG7: Keypoint Orientation for lines or section number
!======================================================
_SAVE
/prep7
*msg,warn
ATTMESH has been deprecated, use ATMESH instead
geomType = ARG1
lett = strsub(geomType,1,1)
type = ARG2
mnum = ARG3
!Error Checking
*if,type,LE,0,or,mnum,LE,0,THEN
*msg,note
ATTMESH command not issued because either material or element type was non-positive
*go,:RETURN
*endif
*if,ARG4,gt,0,then !Deal with slection of things
CM,temp_cm,geomType
%lett%sel,s,,,ARG4,ARG5,ARG6,
*elseif,ARG4,eq,0,then
CM,temp_cm,geomType
%lett%sel,r,p
*endif
%lett%clear,all
!AATT, MAT, REAL, TYPE, ESYS, SECN
!LATT, MAT, REAL, TYPE, --, KB, KE, SECNUM
%lett%att,mnum,type,type,,ARG7
%lett%mesh,all !Mesh Things
*if,ARG4,ge,0,then
cmsel,s,temp_cm
cmdele,temp_cm
*endif
:RETURN
!======THE--END========THE--END========THE--END========
!ITS THE END OF THE FILE AS WE KNOW IT, AND I FEEL FINE