home *** CD-ROM | disk | FTP | other *** search
- /* CMD: Load Project
- *
- * This is a Lightwave Modeler Macro that will load a project that
- * was saved with the "Save_Project.lwm" macro. It will load all objects
- * up into seperate layers again.
- *
- * 2/94 Jason Mussetter
- */
-
-
-
- mxx="LWModelerARexx.port"
- signal on error
- signal on syntax
- mxx_add = addlib(mxx,0)
- call main
- if (mxx_add) then call remlib(mxx)
- exit
-
- syntax:
- error:
- t=Notify(1,'Rexx Script Error','@'ErrorText(rc), 'Line 'SIGL)
- if (mxx_add) then call remlib(mxx)
- exit
-
- main:
-
- /* We'll ask the user for the Prefix of the Project's name. */
-
- CALL REQ_BEGIN("Load Project")
-
- Prj_Prfx = REQ_ADDCONTROL("Project Prefix", string, 50)
- Num_Layr = REQ_ADDCONTROL("Number of Layers",number,0)
- CALL REQ_POST()
- If result = 0 then return
- ProjectPrifix = REQ_GETVAL(Prj_Prfx)
- LayerCount = REQ_GETVAL(Num_Layr)
-
- CALL REQ_END()
-
- Cont = NOTIFY(3,"All project files are there?")
- If result = 0 then return
-
-
- /* After we have the Project's name prefix, we'll load each layer. */
-
- CALL SETLAYER(1)
- if LayerCount > 0 then CALL LOAD(ProjectPrifix||"1.lwob")
-
- CALL SETLAYER(2)
- if LayerCount > 1 then CALL LOAD(ProjectPrifix||"2.lwob")
-
- CALL SETLAYER(3)
- if LayerCount > 2 then CALL LOAD(ProjectPrifix||"3.lwob")
-
- CALL SETLAYER(4)
- if LayerCount > 3 then CALL LOAD(ProjectPrifix||"4.lwob")
-
- CALL SETLAYER(5)
- if LayerCount > 4 then CALL LOAD(ProjectPrifix||"5.lwob")
-
- CALL SETLAYER(6)
- if LayerCount > 5 then CALL LOAD(ProjectPrifix||"6.lwob")
-
- CALL SETLAYER(7)
- if LayerCount > 6 then CALL LOAD(ProjectPrifix||"7.lwob")
-
- CALL SETLAYER(8)
- if LayerCount > 7 then CALL LOAD(ProjectPrifix||"8.lwob")
-
- return
-