forked from bguest/ansys-macros
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GetSec.mac
53 lines (45 loc) · 1.13 KB
/
GetSec.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
53
/PMACRO
!&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
!GETSEC.MAC
!B.GUEST: bagvoo@gmail.com
!DESCRIPTION: This macro calculateds the section
! properties from an area
!PRECONDTIONS:
! ARG1 = Area Number
! ELSE user is prompted to pick an area
! ARG2 = Element size used for calculations
! ELSE Default is used
!POSTCONDITIONS:
! Area information is printed to the screen
!&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
/prep7
CM,temp_AREA,AREA
!---------------------------GET AREA
*IF,ARG1,EQ,0,THEN
*MSG,UI
SELECT AREA
ASEL,R,P
*ELSE
ASEL,S,,,ARG1
*ENDIF
!---------------------------GET ELEMENT SIZE
*IF,ARG2,NE,0,THEN
ESIZE,ARG2
*ENDIF
!------------------------------------------------------
!Mesh Area
/Prep7
ET,996,MESH200,7
TYPE,996 $ MAT,996 $ REAL,996
AMESH,ALL
!Do Section Stuff
SECWRITE,TempBeam,SECT,,996
SECTYPE,996,BEAM,MESH,
SECOFFSET,CENT,,,
SECREAD,'TempBeam','SECT',' ',MESH
ACLEAR,ALL
SLIST, 996, 996, 1, 44, ALL
SECPLOT,996,1 !SectionID,PlotElementsFlag
CMSEL,S,temp_Area
!======THE--END========THE--END========THE--END========
!ITS THE END OF THE MACRO AS WE KNOW IT AND I FEEL FINE