-
Notifications
You must be signed in to change notification settings - Fork 0
/
Doc_SynchronizeWithCentral.dyf
104 lines (101 loc) · 8.29 KB
/
Doc_SynchronizeWithCentral.dyf
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<Workspace Version="1.3.2.2480" X="247.838113081484" Y="136.647867297773" zoom="0.496186487382813" ScaleFactor="1" Name="Doc_SynchronizeWithCentral" Description="Synchronize With Central" ID="b1b9700b-c6a0-46d7-a055-2e830709777d" Category="ArupBimSF.Revit.Document">
<NamespaceResolutionMap />
<Elements>
<Dynamo.Graph.Nodes.CustomNodes.Output guid="57e12349-e730-4436-8e8e-3591c3d1ac48" type="Dynamo.Graph.Nodes.CustomNodes.Output" nickname="Output" x="1300.50412526645" y="342" isVisible="true" isUpstreamVisible="true" lacing="Disabled" isSelectedInput="False" IsFrozen="false" isPinned="false">
<PortInfo index="0" default="False" />
<Symbol value="success" />
</Dynamo.Graph.Nodes.CustomNodes.Output>
<PythonNodeModels.PythonNode guid="e1b49074-b3b0-4308-90e1-8a547ae547a6" type="PythonNodeModels.PythonNode" nickname="Python Script" x="1101.50412526645" y="342" isVisible="true" isUpstreamVisible="true" lacing="Disabled" isSelectedInput="False" IsFrozen="false" isPinned="false" inputcount="9">
<PortInfo index="0" default="False" />
<PortInfo index="1" default="False" />
<PortInfo index="2" default="False" />
<PortInfo index="3" default="False" />
<PortInfo index="4" default="False" />
<PortInfo index="5" default="False" />
<PortInfo index="6" default="False" />
<PortInfo index="7" default="False" />
<PortInfo index="8" default="False" />
<Script>import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
relStandardWS = IN[0]
relViewWS = IN[1]
relFamWS = IN[2]
relUserWS = IN[3]
relCheckedOutElems = IN[4]
compact = IN[5]
saveLocalBefore = IN[6]
saveLocalAfter = IN[7]
comment = IN[8]
doc = DocumentManager.Instance.CurrentDBDocument
tOptions = TransactWithCentralOptions()
rOptions = RelinquishOptions(False)
rOptions.StandardWorksets = relStandardWS
rOptions.ViewWorksets = relViewWS
rOptions.FamilyWorksets = relFamWS
rOptions.UserWorksets = relUserWS
rOptions.CheckedOutElements = relCheckedOutElems
sOptions = SynchronizeWithCentralOptions()
sOptions.SetRelinquishOptions(rOptions)
sOptions.Compact = compact
sOptions.SaveLocalBefore = saveLocalBefore
sOptions.SaveLocalAfter = saveLocalAfter
sOptions.Comment = comment
TransactionManager.Instance.ForceCloseTransaction()
try:
doc.SynchronizeWithCentral(tOptions, sOptions)
OUT = True
except:
OUT = false</Script>
</PythonNodeModels.PythonNode>
<Dynamo.Graph.Nodes.CustomNodes.Symbol guid="818ee4ae-a537-49d6-9fff-dd7cf22f21a3" type="Dynamo.Graph.Nodes.CustomNodes.Symbol" nickname="Input" x="586.742758448681" y="342.894464077087" isVisible="true" isUpstreamVisible="true" lacing="Disabled" isSelectedInput="True" IsFrozen="false" isPinned="false">
<Symbol value="relinquishProjectStandardWorksets : bool = false" />
</Dynamo.Graph.Nodes.CustomNodes.Symbol>
<Dynamo.Graph.Nodes.CustomNodes.Symbol guid="9a999d39-8c60-4d86-922d-e2962dc4e916" type="Dynamo.Graph.Nodes.CustomNodes.Symbol" nickname="Input" x="586.666432521856" y="403.878916471049" isVisible="true" isUpstreamVisible="true" lacing="Disabled" isSelectedInput="True" IsFrozen="false" isPinned="false">
<Symbol value="relinquishViewWorksets : bool = false" />
</Dynamo.Graph.Nodes.CustomNodes.Symbol>
<Dynamo.Graph.Nodes.CustomNodes.Symbol guid="47814d16-7b02-4c8e-8e87-c023ebe80d42" type="Dynamo.Graph.Nodes.CustomNodes.Symbol" nickname="Input" x="584.30294537869" y="469.496584402488" isVisible="true" isUpstreamVisible="true" lacing="Disabled" isSelectedInput="True" IsFrozen="false" isPinned="false">
<Symbol value="relinquishFamilyWorksets : bool = false" />
</Dynamo.Graph.Nodes.CustomNodes.Symbol>
<Dynamo.Graph.Nodes.CustomNodes.Symbol guid="1baca401-3512-4dbb-962c-5f60773feac3" type="Dynamo.Graph.Nodes.CustomNodes.Symbol" nickname="Input" x="583" y="531.697291177621" isVisible="true" isUpstreamVisible="true" lacing="Disabled" isSelectedInput="True" IsFrozen="false" isPinned="false">
<Symbol value="relinquishUserCreatedWorksets : bool = false" />
</Dynamo.Graph.Nodes.CustomNodes.Symbol>
<Dynamo.Graph.Nodes.CustomNodes.Symbol guid="732263ad-147e-43c9-a8f6-7eeac32e1433" type="Dynamo.Graph.Nodes.CustomNodes.Symbol" nickname="Input" x="586.184922612784" y="604.792462029842" isVisible="true" isUpstreamVisible="true" lacing="Disabled" isSelectedInput="True" IsFrozen="false" isPinned="false">
<Symbol value="relinquishBorrowedElements : bool = false" />
</Dynamo.Graph.Nodes.CustomNodes.Symbol>
<Dynamo.Graph.Nodes.CustomNodes.Symbol guid="3a633cd2-25dd-4415-9975-e3721a9d2bac" type="Dynamo.Graph.Nodes.CustomNodes.Symbol" nickname="Input" x="589.477331437175" y="747.625384679562" isVisible="true" isUpstreamVisible="true" lacing="Disabled" isSelectedInput="True" IsFrozen="false" isPinned="false">
<Symbol value="saveLocalFileBeforeSync : bool = true" />
</Dynamo.Graph.Nodes.CustomNodes.Symbol>
<Dynamo.Graph.Nodes.CustomNodes.Symbol guid="3b4fdefe-e141-499e-9159-c464c950c965" type="Dynamo.Graph.Nodes.CustomNodes.Symbol" nickname="Input" x="588.681270458961" y="675.365135802844" isVisible="true" isUpstreamVisible="true" lacing="Disabled" isSelectedInput="True" IsFrozen="false" isPinned="false">
<Symbol value="compactCentralModel : bool = false" />
</Dynamo.Graph.Nodes.CustomNodes.Symbol>
<Dynamo.Graph.Nodes.CustomNodes.Symbol guid="72ba0c24-3d3f-4ca7-8722-d1dfe5ea4eeb" type="Dynamo.Graph.Nodes.CustomNodes.Symbol" nickname="Input" x="591.06349044034" y="820.594143360238" isVisible="true" isUpstreamVisible="true" lacing="Disabled" isSelectedInput="True" IsFrozen="false" isPinned="false">
<Symbol value="saveLocalFileAfterSync : bool = true" />
</Dynamo.Graph.Nodes.CustomNodes.Symbol>
<Dynamo.Graph.Nodes.CustomNodes.Symbol guid="6992baf1-de90-4efc-b60c-672377fa3e49" type="Dynamo.Graph.Nodes.CustomNodes.Symbol" nickname="Input" x="591.39264468416" y="899.220229028454" isVisible="true" isUpstreamVisible="true" lacing="Disabled" isSelectedInput="True" IsFrozen="false" isPinned="false">
<Symbol value="comment : string = """ />
</Dynamo.Graph.Nodes.CustomNodes.Symbol>
</Elements>
<Connectors>
<Dynamo.Graph.Connectors.ConnectorModel start="e1b49074-b3b0-4308-90e1-8a547ae547a6" start_index="0" end="57e12349-e730-4436-8e8e-3591c3d1ac48" end_index="0" portType="0" />
<Dynamo.Graph.Connectors.ConnectorModel start="818ee4ae-a537-49d6-9fff-dd7cf22f21a3" start_index="0" end="e1b49074-b3b0-4308-90e1-8a547ae547a6" end_index="0" portType="0" />
<Dynamo.Graph.Connectors.ConnectorModel start="9a999d39-8c60-4d86-922d-e2962dc4e916" start_index="0" end="e1b49074-b3b0-4308-90e1-8a547ae547a6" end_index="1" portType="0" />
<Dynamo.Graph.Connectors.ConnectorModel start="47814d16-7b02-4c8e-8e87-c023ebe80d42" start_index="0" end="e1b49074-b3b0-4308-90e1-8a547ae547a6" end_index="2" portType="0" />
<Dynamo.Graph.Connectors.ConnectorModel start="1baca401-3512-4dbb-962c-5f60773feac3" start_index="0" end="e1b49074-b3b0-4308-90e1-8a547ae547a6" end_index="3" portType="0" />
<Dynamo.Graph.Connectors.ConnectorModel start="732263ad-147e-43c9-a8f6-7eeac32e1433" start_index="0" end="e1b49074-b3b0-4308-90e1-8a547ae547a6" end_index="4" portType="0" />
<Dynamo.Graph.Connectors.ConnectorModel start="3a633cd2-25dd-4415-9975-e3721a9d2bac" start_index="0" end="e1b49074-b3b0-4308-90e1-8a547ae547a6" end_index="6" portType="0" />
<Dynamo.Graph.Connectors.ConnectorModel start="3b4fdefe-e141-499e-9159-c464c950c965" start_index="0" end="e1b49074-b3b0-4308-90e1-8a547ae547a6" end_index="5" portType="0" />
<Dynamo.Graph.Connectors.ConnectorModel start="72ba0c24-3d3f-4ca7-8722-d1dfe5ea4eeb" start_index="0" end="e1b49074-b3b0-4308-90e1-8a547ae547a6" end_index="7" portType="0" />
<Dynamo.Graph.Connectors.ConnectorModel start="6992baf1-de90-4efc-b60c-672377fa3e49" start_index="0" end="e1b49074-b3b0-4308-90e1-8a547ae547a6" end_index="8" portType="0" />
</Connectors>
<Notes />
<Annotations />
<Presets />
<Cameras>
<Camera Name="Background Preview" eyeX="-17" eyeY="24" eyeZ="50" lookX="12" lookY="-13" lookZ="-58" upX="0" upY="1" upZ="0" />
</Cameras>
</Workspace>