2727
2828
2929class Parameters ():
30- """Collection of MAPDL parameters obtainable from the \*GET command"""
30+ """Collection of MAPDL parameters obtainable from the \*GET command
31+
32+ Examples
33+ --------
34+ Simply list all parameters except for MAPDL MATH parameters
35+
36+ >>> mapdl.parameters
37+ ARR : ARRAY DIM (3, 1, 1)
38+ PARM_FLOAT : 20.0
39+ PARM_INT : 10.0
40+ PARM_LONG_STR : "stringstringstringstringstringst"
41+ PARM_STR : "string"
42+ PORT : 50052.0
43+
44+ Get a parameter
45+
46+ >>> mapdl.parameters['PARM_FLOAT']
47+ 20.0
48+
49+ Get an array parameter
50+
51+ >>> mapdl.parameters['ARR']
52+ array([1., 2., 3.])
53+
54+ """
3155
3256 def __init__ (self , mapdl ):
3357 if not isinstance (mapdl , _MapdlCore ):
@@ -42,7 +66,7 @@ def _log(self):
4266 return self ._mapdl ._log
4367
4468 @property
45- def routine (self ):
69+ def routine (self ) -> str :
4670 """Current routine string as a string. For example ``"/PREP7"``
4771
4872 MAPDL Command: \*GET, ACTIVE, 0, ROUT
@@ -52,15 +76,15 @@ def routine(self):
5276 routine : str
5377 Routine as a string. One of:
5478
55- - ``"Begin level"``
56- - ``"PREP7"``
57- - ``"SOLUTION"``
58- - ``"POST1"``
59- - ``"POST26"``
60- - ``"AUX2"``
61- - ``"AUX3"``
62- - ``"AUX12"``
63- - ``"AUX15"``
79+ - ``"Begin level"``
80+ - ``"PREP7"``
81+ - ``"SOLUTION"``
82+ - ``"POST1"``
83+ - ``"POST26"``
84+ - ``"AUX2"``
85+ - ``"AUX3"``
86+ - ``"AUX12"``
87+ - ``"AUX15"``
6488
6589 Examples
6690 --------
@@ -71,78 +95,139 @@ def routine(self):
7195 return ROUTINE_MAP [int (value )]
7296
7397 @property
74- def units (self ):
98+ def units (self ) -> str :
7599 """Units specified by /UNITS command.
76100
77101 Returns
78102 -------
79103 units : str
80- Active Units. One of:- "USER"
81- - "SI"
82- - "CGS"
83- - "BFT"
84- - "BIN"
85- - "MKS
86- - "MPA"
87- - "uMKS
104+ Active Units. One of:
105+ - ``"None"``
106+ - ``"USER"``
107+ - ``"SI"``
108+ - ``"CGS"``
109+ - ``"BFT"``
110+ - ``"BIN"``
111+ - ``"MKS``
112+ - ``"MPA"``
113+ - ``"uMKS"``
114+
115+ Examples
116+ --------
117+ >>> mapdl.parameters.units
118+ 'NONE'
88119 """
89120 value = self ._mapdl .get_value ("ACTIVE" , item1 = "UNITS" )
90121 return UNITS_MAP [int (value )]
91122
92123 @property
93- def revision (self ):
124+ def revision (self ) -> float :
94125 """MAPDL revision version.
95126
96- MAPDL revision version as a float. For example ``20.2``.
127+ Examples
128+ --------
129+ >>> mapdl.parameters.revision
130+ 20.2
97131 """
98132 return float (self ._mapdl .get_value ("ACTIVE" , item1 = "REV" ))
99133
100134 @property
101- def platform (self ):
135+ def platform (self ) -> str :
102136 """The current platform.
103137
104- Current platform. For example ``"LIN"`` for Linux.
138+ Examples
139+ --------
140+ >>> mapdl.parameters.platform
141+ 'LIN'
105142 """
106143 return self ._mapdl .get_value ("ACTIVE" , item1 = "PLATFORM" )
107144
108145 @property
109- def csys (self ):
110- """Active coordinate system"""
146+ def csys (self ) -> int :
147+ """Active coordinate system
148+
149+ Examples
150+ --------
151+ >>> mapdl.parameters.csys
152+ 0
153+ """
111154 return int (self ._mapdl .get_value ("ACTIVE" , item1 = "CSYS" ))
112155
113156 @property
114- def dsys (self ):
115- """Active display coordinate system"""
157+ def dsys (self ) -> int :
158+ """Active display coordinate system
159+
160+ Examples
161+ --------
162+ >>> mapdl.parameters.dsys
163+ 0
164+ """
116165 return int (self ._mapdl .get_value ("ACTIVE" , item1 = "DSYS" ))
117166
118167 @property
119- def rsys (self ):
120- """Active result coordinate system"""
168+ def rsys (self ) -> int :
169+ """Active result coordinate system
170+
171+ Examples
172+ --------
173+ >>> mapdl.parameters.rsys
174+ 0
175+ """
121176 return int (self ._mapdl .get_value ("ACTIVE" , item1 = "RSYS" ))
122177
123178 @property
124- def esys (self ):
125- """Active element coordinate system"""
179+ def esys (self ) -> int :
180+ """Active element coordinate system
181+
182+ Examples
183+ --------
184+ >>> mapdl.parameters.esys
185+ 0
186+ """
126187 return int (self ._mapdl .get_value ("ACTIVE" , item1 = "ESYS" ))
127188
128189 @property
129- def section (self ):
130- """Active section number"""
190+ def section (self ) -> int :
191+ """Active section number
192+
193+ Examples
194+ --------
195+ >>> mapdl.parameters.section
196+ 1
197+ """
131198 return int (self ._mapdl .get_value ("ACTIVE" , item1 = "SECT" ))
132199
133200 @property
134- def material (self ):
135- """Active material"""
201+ def material (self ) -> int :
202+ """Active material
203+
204+ Examples
205+ --------
206+ >>> mapdl.parameters.material
207+ 1
208+ """
136209 return int (self ._mapdl .get_value ("ACTIVE" , item1 = "MAT" ))
137210
138211 @property
139- def real (self ):
140- """Active real constant set"""
212+ def real (self ) -> int :
213+ """Active real constant set
214+
215+ Examples
216+ --------
217+ >>> mapdl.parameters.real
218+ 1
219+ """
141220 return int (self ._mapdl .get_value ("ACTIVE" , item1 = "REAL" ))
142221
143222 @property
144- def type (self ):
145- """Active element type"""
223+ def type (self ) -> int :
224+ """Active element type
225+
226+ Examples
227+ --------
228+ >>> mapdl.parameters.type
229+ 1
230+ """
146231 return int (self ._mapdl .get_value ("ACTIVE" , item1 = "type" ))
147232
148233 @property
@@ -198,8 +283,8 @@ def _set_parameter(self, name, value):
198283 name : str
199284 An alphanumeric name used to identify this parameter. Par
200285 may be up to 32 characters, beginning with a letter and
201- containing only letters, numbers, and underscores. Examples:
202- ``"ABC" "A3X" "TOP_END"``.
286+ containing only letters, numbers, and underscores.
287+ Examples: ``"ABC" "A3X" "TOP_END"``.
203288
204289 """
205290 if not isinstance (value , (str , int , float )):
0 commit comments