midas-civil 1.0.3__py3-none-any.whl → 1.0.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of midas-civil might be problematic. Click here for more details.
- midas_civil/__init__.py +1 -1
- midas_civil/_mapi.py +16 -5
- {midas_civil-1.0.3.dist-info → midas_civil-1.0.4.dist-info}/METADATA +1 -1
- {midas_civil-1.0.3.dist-info → midas_civil-1.0.4.dist-info}/RECORD +7 -7
- {midas_civil-1.0.3.dist-info → midas_civil-1.0.4.dist-info}/WHEEL +0 -0
- {midas_civil-1.0.3.dist-info → midas_civil-1.0.4.dist-info}/licenses/LICENSE +0 -0
- {midas_civil-1.0.3.dist-info → midas_civil-1.0.4.dist-info}/top_level.txt +0 -0
midas_civil/__init__.py
CHANGED
midas_civil/_mapi.py
CHANGED
|
@@ -3,6 +3,8 @@ import sys
|
|
|
3
3
|
import winreg
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
|
|
7
|
+
|
|
6
8
|
def Midas_help():
|
|
7
9
|
"""MIDAS Documnetation : https://midas-rnd.github.io/midasapi-python """
|
|
8
10
|
print("---"*22)
|
|
@@ -69,6 +71,7 @@ class MAPI_BASEURL:
|
|
|
69
71
|
class MAPI_KEY:
|
|
70
72
|
"""MAPI key from Civil NX.\n\nEg: MAPI_Key("eadsfjaks568wqehhf.ajkgj345qfhh")"""
|
|
71
73
|
data = ""
|
|
74
|
+
count = 1
|
|
72
75
|
|
|
73
76
|
def __init__(self, mapi_key:str):
|
|
74
77
|
MAPI_KEY.data = mapi_key
|
|
@@ -128,6 +131,11 @@ def MidasAPI(method:str, command:str, body:dict={})->dict:
|
|
|
128
131
|
sys.exit(0)
|
|
129
132
|
|
|
130
133
|
# print(method, command, response.status_code , "✅")
|
|
134
|
+
if MAPI_KEY.count == 1:
|
|
135
|
+
MAPI_KEY.count = 0
|
|
136
|
+
_checkUSER()
|
|
137
|
+
|
|
138
|
+
|
|
131
139
|
|
|
132
140
|
return response.json()
|
|
133
141
|
|
|
@@ -146,8 +154,11 @@ def _setUNIT(unitJS):
|
|
|
146
154
|
MidasAPI('PUT','/db/UNIT',js)
|
|
147
155
|
|
|
148
156
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
print(f"
|
|
153
|
-
print("
|
|
157
|
+
def _checkUSER():
|
|
158
|
+
try:
|
|
159
|
+
resp = MidasAPI('GET','/config/ver',{})['VER']
|
|
160
|
+
print(f"Connected to {resp["NAME"]} 🟢")
|
|
161
|
+
print(f"USER : {resp["USER"]} | COMPANY : {resp["COMPANY"]}")
|
|
162
|
+
print("-"*85)
|
|
163
|
+
except:
|
|
164
|
+
print("")
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
midas_civil/__init__.py,sha256=
|
|
1
|
+
midas_civil/__init__.py,sha256=LjRnvtkFv9PHNywiXVJmWjF2XagqckgqYOaMxEpX0EY,997
|
|
2
2
|
midas_civil/_boundary.py,sha256=s5mgZIc1b0-P7AdWuaPAQ5cIbHL5CR1YRKJA7KE4W_U,32958
|
|
3
3
|
midas_civil/_construction.py,sha256=q9C3gGdvky5t7jCDzd6lBRv6pm8cMycI91xfkgDV37Y,40673
|
|
4
4
|
midas_civil/_construction_backup.py,sha256=Pj7V-NYCkkT-aMjKXfs1jKa9klsGh48UXDLwn3BLYTY,18225
|
|
5
5
|
midas_civil/_element.py,sha256=O6PBn5yWI_EFpHpCMOVoo8zsA5fup1pwdY058LSc0pY,30411
|
|
6
6
|
midas_civil/_group.py,sha256=Go4If-cwdKMfIDlNi1MYYq4jPYOa3MlVvNkX2pTkyCs,9864
|
|
7
7
|
midas_civil/_load.py,sha256=TltWAjDaeC5MNW8IIPKgpLahDQgJR3J6SzinkCrJS7A,30171
|
|
8
|
-
midas_civil/_mapi.py,sha256=
|
|
8
|
+
midas_civil/_mapi.py,sha256=m7bI1eZ02VPRWBdJTn0tnn7bO-hVnKj5GqyizQ8ahqA,5322
|
|
9
9
|
midas_civil/_material.py,sha256=uJEIHJM9OhwTRWUI2mtd_0BQSxdlYhATYJu9P7tNNBA,69511
|
|
10
10
|
midas_civil/_model.py,sha256=I7lzMsOhqWcDcBYtPSqBUs97sBEf5M1mJ0KLftyGGB4,16597
|
|
11
11
|
midas_civil/_movingload.py,sha256=kzTbi4vFjOnUYOyhDDTmSHFU-sDGb_MgMBNXUmFmUZc,80001
|
|
@@ -20,8 +20,8 @@ midas_civil/_tendon.py,sha256=mXNJeLikFsBpgn8u9fED2qx9oqnKh3XtIpYwp3moEfk,33395
|
|
|
20
20
|
midas_civil/_thickness.py,sha256=4xQsLA3Q_gIGCwLc_glFmiErdWdQUSwhlEhJ_IPJseA,3248
|
|
21
21
|
midas_civil/_utils.py,sha256=GR9cj-mgRPmtwmgqEj4JeEjMlRS6zmvhcxFV5IHbpRk,2708
|
|
22
22
|
midas_civil/_view.py,sha256=o7rkfoQzmgAb3dT0ujPIQLVwVlveo3rMRIbZU1UosZo,849
|
|
23
|
-
midas_civil-1.0.
|
|
24
|
-
midas_civil-1.0.
|
|
25
|
-
midas_civil-1.0.
|
|
26
|
-
midas_civil-1.0.
|
|
27
|
-
midas_civil-1.0.
|
|
23
|
+
midas_civil-1.0.4.dist-info/licenses/LICENSE,sha256=zrL4RwZC4rb-by_ZHKXwKdIwcs6ATy59TPZ9HxPHCrs,1071
|
|
24
|
+
midas_civil-1.0.4.dist-info/METADATA,sha256=ahfga-BmOgin0XPh0XXLnYIIrOhgiMSuDouGS-88AJk,2085
|
|
25
|
+
midas_civil-1.0.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
26
|
+
midas_civil-1.0.4.dist-info/top_level.txt,sha256=_NFmrlN5V9OxJ-PAO4s_om8OA8uupXho3QqZcSsnbuI,12
|
|
27
|
+
midas_civil-1.0.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|