Announcement

Collapse
No announcement yet.

Calling Journal Gurus - Make Local Script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Calling Journal Gurus - Make Local Script

    So my office uses the make locak script by David Baldacchino. We are running into a problem with it though.

    If your central file has any notification like Manage Links, Cooridnation Review... any propts at the opening of the central it errors out opening with selecting worksets.

    Does anybody have a solution for this issue? I think the jorunal file that controls opening the centeral file could be modified to accomidate automatic prompts.
    Code:
    '
    	Set Jrn = CrsJournalScript
    	Jrn.Command "Menu" , "Open an existing project , 57601 , ID_REVIT_FILE_OPEN"
    	Jrn.Data "File Name"  _
    	, "IDOK", "C:\Revit Local Files\010170_BIM_SMASTER_S11\010170_BIM_SMASTER_S11_Alex.Cunningham.rvt"
    	Jrn.Data "WorksetConfig"  _
    	, "Editable", 0
    	  Jrn.Data "MessageBox"  _
    			  , "IDOK", "This Central File has been copied or moved from ""P:\2010\010170 Los Rios CCD Cosumnes River College Instructional Bldg\Models\Structural\010170_BIM_SMASTER_S11_CENTRAL.rvt"" to ""C:\Revit Local Files\010170_BIM_SMASTER_S11\010170_BIM_SMASTER_S11_Alex.Cunningham.rvt""." & vbCrLf & "" & vbCrLf & "If you wish this file to remain a Central File then you must re-save the file as a Central File. To do this select ""Save As"" from the ""File"" menu and check the ""Make this a Central File after save"" check box (under the options button) before you save." & vbCrLf & "" & vbCrLf & "If you do not save the file as a Central File then it will be considered a local user copy of the file belonging to user ""Alex.Cunningham""."
    	Jrn.Command "Menu" , "Workset control , 33460 , ID_SETTINGS_PARTITIONS"
    Last edited by Alex Cunningham; July 18, 2011, 10:58 PM.
    -Alex Cunningham

    #2
    Use the Make New Local button?
    Aaron "selfish AND petulant" Maller |P A R A L L A X T E A M | Practice Technology Implementation
    @Web | @Twitter | @LinkedIn | @Email

    Comment


      #3
      Originally posted by Alex Cunningham View Post
      ...I think the journal file that controls opening the central file could be modified to accommodate automatic prompts.
      I looked into this a while back for batch upgrading a bunch of project files that some would prompt for things like linked cad files and some would not. Needless to say I couldn't do what I wanted with journals... I was hoping for a setting or ini varaible that I could set to ignore certain types of prompts like this. At the time it wasn't possible at all and the the next version of the API would allow me to do that, but the API is still above my pay grade. If the Make new local button doesn't work for you for some reason, maybe you have access to resources to use the API to replicate the Journal script.

      Comment


        #4
        I also think the journal file is opening in the wrong way.

        When you manualy open a central and specify worksets it prompts you at the start of opening the project.

        Ill play with it more and see what I can come up with.
        -Alex Cunningham

        Comment


          #5
          Ok. So I still need help frm the journal gurus!!!

          I have come up with.

          Code:
          If 3 = WORKSETS
          {
          FileDelete, %JournPath%select_ws.txt
          
          ; Now we create the journal so Revit will prompt us to open select worksets
          
          	FileAppend,
          	(
          	'
          	Set Jrn = CrsJournalScript
          	Jrn.Command "Menu" , "Open an existing project , 57601 , ID_REVIT_FILE_OPEN"
          	Jrn.Data "File Name"  _
          	, "IDOK", "%DESTINATION%%LOCALFILE%"
          	Jrn.Data "WorksetConfig"  _
          	, "Custom", 1
          	  Jrn.Data "MessageBox"  _
          			  , "IDOK", "This Central File has been copied or moved from ""%FolderCentral%\%CENTRALFILE%"" to ""%DESTINATION%%LOCALFILE%""." & vbCrLf & "" & vbCrLf & "If you wish this file to remain a Central File then you must re-save the file as a Central File. To do this select ""Save As"" from the ""File"" menu and check the ""Make this a Central File after save"" check box (under the options button) before you save." & vbCrLf & "" & vbCrLf & "If you do not save the file as a Central File then it will be considered a local user copy of the file belonging to user ""%Username%""."
          	
          	), %JournPath%select_ws.txt
          
          ; Open Revit Discipline 20XX and open the file; worksets dialog pops up at the end
              Run %AppPath%Revit.exe "%JournPath%select_ws.txt",,max
              Goto, SPLASHSCREEN
          }
          It works except for one thing. It gives me this error.
          Attached Files
          -Alex Cunningham

          Comment


            #6
            This fixes my previous problem.

            Code:
            ;---#### If the shortcut has the "WORKSETS" switch, we run this portion
            If 3 = WORKSETS
            {
            FileDelete, %JournPath%select_ws.txt
            
            ; Now we create the journal so Revit will prompt us to open select worksets
            
            	FileAppend,
            	(
            	'
            	Set Jrn = CrsJournalScript
            Jrn.Command "Menu" , "Open an existing project , ID_REVIT_FILE_OPEN"
              Jrn.Data "FileOpenSubDialog"  _
                      , "OpenAsLocalCheckBox", "False"
            	Jrn.Data "File Name"  _
            	, "IDOK", "%DESTINATION%%LOCALFILE%"
            	Jrn.Data "WorksetConfig"  _
            	, "Custom", 1
            	), %JournPath%select_ws.txt
            
            ; Open Revit Discipline 20XX and open the file; worksets dialog pops up at the end
                Run %AppPath%Revit.exe "%JournPath%select_ws.txt",,max
                Goto, SPLASHSCREEN
            }
            But now I have this... IDK how to correct somthing like this.
            See Picture


            Can anybody help?
            Attached Files
            -Alex Cunningham

            Comment

            Related Topics

            Collapse

            Working...
            X