home *** CD-ROM | disk | FTP | other *** search
- ' This program calculates the amount of ceiling tile material
- ' needed for rooms based on their area. It also adds info
- ' boxes to the drawing containing pricing materials and
- ' calculated costs.
- '
- ' Small Area Info Boxes are placed on Layer 9
- ' Large Material Info Boxes are placed on Layer 10
- ' Tempoary Items are drawn on Layer 11, it should be left empty
- ' Attributes for Area to be calculated are on Layer 12
- ' Attributes for Length to be calculated are on Layer 13
- ' The Master Info Box is on Layer 14
- '
- ' This program initializes all variables, clears them, and
- ' checks for the 600.txt file. If it exists, this file reads
- ' the values from it, and launches the small box program,
- ' 600_2_Area.d3m.
- '
- ' If it does not find values, it launches 600_4_NoData.d3m instead.
- '
- ' Initialize Variables
- Clear
- ' Length and Area
- Len0 = 0
- Len1 = 0
- Len2 = 0
- Area1 = 0
- Area2 = 0
- ' MTee Variables
- MTeeN = 0
- MTeeC = 0
- MTeeN2 = 0
- MTeeC2 = 0
- ' 1.2CN Variables
- CN12 = 0
- CNC12 = 0
- CN122 = 0
- CNC122 = 0
- ' 1.6CN Variables
- CN6 = 0
- CN6C = 0
- CN62 = 0
- CN6C2 = 0
- ' ST Fix Variables
- STFix = 0
- STFixC = 0
- STFix2 = 0
- CTFixC2 = 0
- ' RodsT Variables
- RodsT = 0
- RodsTC = 0
- RodsT2 = 0
- RodsTC2 = 0
- ' Rods B Variables
- RodsB = 0
- RodsBC = 0
- RodsB2 = 0
- RodsBC2 = 0
- ' Channel Variables
- AddLen = 0
- Chan = 0
- Chan2 = 0
- Chan2C = 0
- ' Panel Variables
- Panel = 0
- Pan1 = 0
- Pan2 = 0
- Pan3 = 0
- PanNum = 0
- PanNum2 = 0
- ' String Variables used in large Info Boxes
- MTeeN2$ = ""
- MTeeC2$ = ""
- CN122$ = ""
- CNC122$ = ""
- CN62$ = ""
- CN6C2$ = ""
- STFix2$ = ""
- STFixC2$ = ""
- RodsT2$ = ""
- RodsTC2$ = ""
- RodsB2$ = ""
- RodsBC2$ = ""
- Chan2$ = ""
- Chan2C$ = ""
- Pan3$ = ""
- ' Misc New Variables
- RType = 0
- a = 0
- b = 0
- PanNum = 0
- ' Startup Stuff Here
- ' Get Drawing Width
- MinnX = Sys(120)
- MaxxX = Sys(122)
- Diff = MaxxX - MinnX
- Diff = Diff * .25
- if Diff <= 0 then Diff = 5
- '
- ' Set text size to 1
- Sys(12) = 1
- '
- ' Prevent users from starting commands while the program is running
- Sys(470) = 1
- '
- ' Make sure drawing is not empty before continuing
- if Sys(9) = 0 then
- Message "Please use this program only in a drawing with entities."
- goto Ender
- endif
- '
- ' Setup Default Drawing Options
- ' Line Width is always 0
- Sys(6) = 0
- ' Line Type is always 0
- Sys(4) = 0
- ' Text in Current Color Yes
- Sys(254) = 1
- ' Text in Current Layer Yes
- Sys(255) = 1
- ' Text Style is normal
- Sys(258) = 0
- ' Read Values from ASCII text file
- ' Based on RType chosen by user above
- On Error goto KDW
- open "i", 1, "*\sample Macros\600.txt"
- ' Assign #s found to Variables
- Input #1, AddLen
- Input #1, TH
- Input #1, PanNum2
- Input #1, PanNum
- ' Close File
- Close #1
- '
-
- ' Values were found in the ASCII text file, which means the user
- ' has run this program before, so go onto the area macro.
- Run "600_2_Area.d3m"
- ' This BSC is over
- Ender:
- end
-
- ' This macro had some trouble opening the 600.txt file, which most
- ' likely does not exist, so go to the other macro which prompts the
- ' user for variables, and creates the file.
- KDW:
- Run "600_4_NoData.d3m"
- ' This BSC is over
- end
-
-