, :
, . 2003, , , 2004 Autodesk Revit.
, Revit Autodesk , . 7 , 50 , Autodesk, Revit, , BIM BIM .
- , .
1.
Autodesk Revit , (Template) . (Worksets) (Levels) (Grids), , , (Site). , (Layouts) 000 00240, (Site) 100 00000. , .
(Worksets), (Massing), (Structure), (Architecture), (Technology), (Services) .. , , . ? Revit , . , , , (Walls), (Floors), (Ceilings), (Openings) .., . ?
2.
: C:\Users\%UserName%\AppData\Local\Autodesk\Revit\Autodesk Revit 2016\Journals., , . , , - , . L:/01 Libraries/Autodesk/Revit/2016/ASK/ASK 000 00000/JRN .
(Notepad). , , , , . , 3-4 , Revit . , , , .
, , Jrn vbScript :
- Dim Jrn
- Set Jrn = CrsJournalScript
Jrn , , .
. , , Revit, , , , .., :
- Jrn.AppButtonEvent 1 , Application Menu is opening
. :
- Jrn.AppButtonEvent 0 , Application Menu is closing Jrn.Command "Ribbon" , "Create a new project , ID_FILE_NEW_CHOOSE_TEMPLATE"
, . , , . :
- Jrn.PushButton "Modal , New Project , Dialog_Revit_NewProject" _
, "Browse..., Control_Revit_BrowseTemplateName" - Jrn.Data "FileDialog" _
, "IDOK" , "L:\01 Libraries\Autodesk\Revit\2016\ASK\ASK 000 00000 General.rte", "rte" _
, "ASK 000 00000 General.rte", "ASK 000 00000 General.rte" - Jrn.Data "FileType" , "Template Files (*.rte)"
(Project Template), , (Worksets) . :
- Jrn.PushButton "Modal , New Project , Dialog_Revit_NewProject" , "OK, IDOK"
, , .., :
- Jrn.Command "StatusBar" , "Workset control , ID_SETTINGS_PARTITIONS"
- Jrn.Edit "Modal , Worksharing , Dialog_Revit_PartitionsEnable" _
, "Control_Revit_PartitionsEnableLevelsGridsViewsEdit" , "ReplaceContents" _
, "000 00240 Layout" - Jrn.Edit "Modal , Worksharing , Dialog_Revit_PartitionsEnable" _
, "Control_Revit_PartitionsEnableOthersEdit" , "ReplaceContents" _
, "100 00000 Site" - Jrn.PushButton "Modal , Worksharing , Dialog_Revit_PartitionsEnable" , "OK, IDOK"
(Levels) (Grids), (Others) . , , (Transaction). ? .
- Jrn.Data "Transaction Successful" , "Worksets"
:
- Jrn.PushButton "Modal , Worksets , Dialog_Revit_Partitions" , "New, Control_Revit_New"
- Jrn.Edit "Modal , New Workset , Dialog_Revit_NewPartition" _
, "Control_Revit_NewPartitionName" , "ReplaceContents" , "200 00000 Massing" - Jrn.PushButton "Modal , New Workset , Dialog_Revit_NewPartition" , "OK, IDOK"
, , , (Transaction) . , , , . :
- Jrn.PushButton "Modal , Worksets , Dialog_Revit_Partitions" , "New, Control_Revit_New"
- Jrn.Edit "Modal , New Workset , Dialog_Revit_NewPartition" _
, "Control_Revit_NewPartitionName" , "ReplaceContents" , "300 00000 Structure" - Jrn.PushButton "Modal , New Workset , Dialog_Revit_NewPartition" , "OK, IDOK"
- Jrn.PushButton "Modal , Worksets , Dialog_Revit_Partitions" , "New, Control_Revit_New"
- Jrn.Edit "Modal , New Workset , Dialog_Revit_NewPartition" _
, "Control_Revit_NewPartitionName" , "ReplaceContents" , "400 00000 Architecture" - Jrn.PushButton "Modal , New Workset , Dialog_Revit_NewPartition" , "OK, IDOK"
- Jrn.PushButton "Modal , Worksets , Dialog_Revit_Partitions" , "New, Control_Revit_New"
- Jrn.Edit "Modal , New Workset , Dialog_Revit_NewPartition" _
, "Control_Revit_NewPartitionName" , "ReplaceContents" , "500 00000 Technology" - Jrn.PushButton "Modal , New Workset , Dialog_Revit_NewPartition" , "OK, IDOK
- Jrn.PushButton "Modal , Worksets , Dialog_Revit_Partitions" , "New, Control_Revit_New"
- Jrn.Edit "Modal , New Workset , Dialog_Revit_NewPartition" _
, "Control_Revit_NewPartitionName" , "ReplaceContents" , "600 00000 Services" - Jrn.PushButton "Modal , New Workset , Dialog_Revit_NewPartition" , "OK, IDOK
, . , (Active Workset) (Gray Inactive Workset Graphics).
- Jrn.Gris Control; Modal , Worksets , Dialog_Revit_Partitions; Control_Revit_Partition" _
, "MoveCurrentCell" , "HeaderRow" , "Name" - Jrn.ComboBox "Modal , Worksets , Dialog_Revit_Partitions" _
, "Control_Revit_ActivePartitionCombo" , "SelEndOk" , "000 00240 Layout" - Jrn.ComboBox "Modal , Worksets , Dialog_Revit_Partitions" _
, "Control_Revit_ActivePartitionCombo" , "Select" , "000 00240 Layout" - Jrn.CheckBox "Modal , Worksets , Dialog_Revit_Partitions" , "Gray Inactive Workset Graphics _
, Control_Revit_GrayInactiveWorksetGraphics" , True
, (Active Workset) "SelEndOk" "Select", , . (Worksets), (Transaction) :
- Jrn.PushButton "Modal , Worksets , Dialog_Revit_Partitions" , "OK, IDOK"
- Jrn.Data "Transaction Successful" , "Worksets"
, (Worksets) :
- Jrn.Command "StatusBar" , "Workset control , ID_SETTINGS_PARTITIONS"
, , , "SelEndOk". , .
3.
, Autodesk Revit . , (Worksets). , (Journal Error) (Enter interactive mode). Revit , , , journal.0001.txt, . , , , :- 1:< Execution did not correspond to recorded journal sequence.
- At line number 31 of source journal.
, . , 31 , "600 00000 Services". , , , .
4.
, , Autodesk Revit vbScript, . (Project Template) (Worksets). Jrn, :- Dim askFileName
- askFileName = "ASK 000 00000 General.rte"
- Dim askFileLocation
- askFileLocation = "L:\01 Libraries\Autodesk\Revit\2016\ASK\"
, askFilePath askFileLocation askFileName:
- Dim askFilePath
- askFilePath = askFileLocation & askFileName
, :
- Jrn.Data "FileDialog" _
, "IDOK" , "L:\01 Libraries\Autodesk\Revit\2016\ASK\ASK 000 00000 General.rte", "rte" _
, "ASK 000 00000 General.rte", "ASK 000 00000 General.rte" - Jrn.Data "FileDialog" , "IDOK", askFilePath, "rte" , askFileName, askFileName
. , vbScript, , (Array) (Worksets) .
vbScript, Language Reference MSDN (Microsoft Developer Network). (Functions) (Array), . askWorksetArray, (Array) (Worksets):
- Dim askWorksetArray
- askWorksetArray = Array("000 00240 Layout","100 00000 Site","200 00000 Massing" _
,"300 00000 Structure","400 00000 Architecture","500 00000 Technology" _
,"600 00000 Services")
, , askWorksetArray(n) , . :
- Jrn.Edit "Modal , Worksharing , Dialog_Revit_PartitionsEnable" _
, "Control_Revit_PartitionsEnableLevelsGridsViewsEdit" , "ReplaceContents" _
, askWorksetArray(0) - Jrn.Edit "Modal , Worksharing , Dialog_Revit_PartitionsEnable" _
, "Control_Revit_PartitionsEnableOthersEdit" , "ReplaceContents" , askWorksetArray(1) - Jrn.Edit "Modal , New Workset , Dialog_Revit_NewPartition" _
, "Control_Revit_NewPartitionName" , "ReplaceContents" , askWorksetArray(2) - Jrn.ComboBox "Modal , Worksets , Dialog_Revit_Partitions" _
, "Control_Revit_ActivePartitionCombo" , "Select" , askWorksetArray(0)
, , . , , .
- Dim askWorksetCount
- askWorksetCount = uBound(askWorksetArray)
, . , . , , askWorksetArray :
- For i = 0 to askWorksetCount - 2
- Jrn.PushButton "Modal , Worksets , Dialog_Revit_Partitions" , "New, Control_Revit_New"
- Jrn.Edit "Modal , New Workset , Dialog_Revit_NewPartition" _
, "Control_Revit_NewPartitionName" , "ReplaceContents" , askWorksetArray(i +2) - Jrn.PushButton "Modal , New Workset , Dialog_Revit_NewPartition" , "OK, IDOK"
- Next
:
- For i = 2 to askWorksetCount
. (Worksets) askWorksetArray, .
5.
, IfElse (Worksets) , Sub . , , .