Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProcessNetTemplate.py
More file actions
Latest commit
76 lines (60 loc) · 2.01 KB
/
Copy pathProcessNetTemplate.py
File metadata and controls
76 lines (60 loc) · 2.01 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
fromrecurdynimport*
# from recurdyn import Chart
# from recurdyn import MTT2D
# from recurdyn import FFlex
# from recurdyn import RFlex
# from recurdyn import Tire
# Common Variables
app=None
application=None
model_document=None
plot_document=None
model=None
ref_frame_1=None
ref_frame_2=None
# initialize() should be called before ProcessNet function call.
definitialize():
globalapp
globalapplication
globalmodel_document
globalplot_document
globalmodel
app=dispatch_recurdyn()
application=IApplication(app.RecurDynApplication)
model_document=application.ActiveModelDocument
ifmodel_documentisnotNone:
model_document=IModelDocument(model_document)
plot_document=application.ActivePlotDocument
ifplot_documentisnotNone:
plot_document=IPlotDocument(plot_document)
ifmodel_documentisNoneandplot_documentisNone:
application.PrintMessage("No model file")
model_document=application.NewModelDocument("Examples")
ifmodel_documentisnotNone:
model_document=IModelDocument(model_document)
model=ISubSystem(model_document.Model)
returnapplication, model_document, plot_document, model
# dispose() should be called after ProcessNet function call.
defdispose():
globalapplication
globalmodel_document
model_document=application.ActiveModelDocument
ifmodel_documentisnotNone:
model_document=IModelDocument(model_document)
else:
return
ifnotmodel_document.Validate():
return
# Redraw() and UpdateDatabaseWindow() can take more time in a heavy model.
model_document.Redraw()
# model_document.PostProcess() # UpdateDatabaseWindow(), SetModified()
model_document.UpdateDatabaseWindow()
# If you call SetModified(), Animation will be reset.
model_document.SetModified()
model_document.SetUndoHistory("Python ProcessNet")
#
application, model_document, plot_document, model=initialize()
#
#
dispose()
#