📄 moldbase.lsp
字号:
;****************************************;
;*this is MoldBase.lsp program *;
;*completely complied in 03/30/99 *;
;*last changed in 04/01/99 *;
;*ZX Mold Ltd XY.Liao *;
;****************************************;
;*******************************************************************************************************;
(defun MoldSys(/ IfExitMoldSys MoldSysNext MoldSysLstItem)
;---------------------------------------------
;Shut off command echo and setq Undo Mark
;---------------------------------------------
(setvar "cmdecho" 0)
(command "undo" "m")
;---------------------------------------------
;Initializing layer
;---------------------------------------------
(load "ini_lay")
(IniLayer)
(IniStyle)
(IniDimStyle)
;---------------------------------------------
;Save old system variable
;---------------------------------------------
(setq os_old (getvar "osmode")
la_old (getvar "clayer")
co_old (getvar "cecolor")
lt_old (getvar "celtype")
pw_old (getvar "plinewid")
st_old (getvar "textstyle")
)
;--------------------------------------------
;defun Mold Base system library
;--------------------------------------------
(setq MoldSysLib '("1. Side Gate System" "2. Three Plate Type System" "3. Pin Point Gate System"))
;--------------------------------------------
;Initialize MoldSysNum as "SG"
;--------------------------------------------
(setq IfExitMoldSys T)
(setq MoldSysLstItem "0")
;--------------------------------------------
;Start dialog
;--------------------------------------------
(setq MoldDclId (load_dialog "MoldBase.dcl"))
(while (= IfExitMoldSys T)
(if (not (new_dialog "mold1" MoldDclId))
(exit)
)
(ini_list "MoldSysLst" MoldSysLib)
(if MoldSysLstItem
(progn
(set_tile "MoldSysLst" MoldSysLstItem)
(msLst_Click)
)
)
(action_tile "MoldSysLst" "(msLst_Click)")
;*************************************************
(setq MoldSysNext (start_dialog))
(cond
((= 1 MoldSysNext)
;-------------------------------------
;select "Next"
;-------------------------------------
(cond
((= "0" MoldSysLstItem)
(setq MoldSysNum "SG")
(MoldTypeSG)
)
((= "1" MoldSysLstItem)
(setq MoldSysNum "TP")
(MoldTypeTP)
)
((= "2" MoldSysLstItem)
(setq MoldSysNum "PP")
(MoldTypePP)
)
)
)
((= 0 MoldSysNext)
;-------------------------------------
;select "Exit"
;-------------------------------------
(setq IfExitMoldSys nil)
)
)
)
(unload_dialog MoldDclId)
(ac_lxy_set)
(prin1)
)
;-------------------------------------------
;Do action when click on Mold system List
;-------------------------------------------
(defun msLst_Click()
;----------------------------------------------
;Defun local function
;----------------------------------------------
(defun ShowImage(ImageName)
(start_image "MoldSysView")
(fill_image 0 0 (dimx_tile "MoldSysView") (dimy_tile "MoldSysView") 0)
(slide_image 0 0 (dimx_tile "MoldSysView") (dimy_tile "MoldSysView") (strcat "MoldBase(" ImageName ")"))
(end_image)
)
;-------------------------------------------
(setq MoldSysLstItem (get_tile "MoldSysLst"))
(cond
((= "0" MoldSysLstItem)
(ShowImage "SideGate")
)
((= "1" MoldSysLstItem)
(ShowImage "3thPlate")
)
((= "2" MoldSysLstItem)
(ShowImage "PinPoint")
)
)
)
;********************************************************************************************************
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
;Get Side Gate System Mold Base Type Function
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
(defun MoldTypeSG( / LastView CurView IfExitMoldType ImageLst)
;--------------------------------------------------------
;Initialize Image list and set MoldTypeNum as "AI" first
;--------------------------------------------------------
(setq ImageLst '("AIV" "AHV" "ATV" "BIV" "BHV" "BTV" "CIV" "CHV" "CTV" "DIV" "DHV" "DTV"))
(setq CurView 1)
;-------------------------------------
;Start dialog
;-------------------------------------
(setq IfExitMoldType T)
(while IfExitMoldType
(if (not (new_dialog "mold21" MoldDclId))
(exit)
)
(IniImage)
(setq LastView nil)
(Click CurView)
(action_tile "AI" "(setq CurView 1) (Click CurView)")
(action_tile "AH" "(setq CurView 2) (Click CurView)")
(action_tile "AT" "(setq CurView 3) (Click CurView)")
(action_tile "BI" "(setq CurView 4) (Click CurView)")
(action_tile "BH" "(setq CurView 5) (Click CurView)")
(action_tile "BT" "(setq CurView 6) (Click CurView)")
(action_tile "CI" "(setq CurView 7) (Click CurView)")
(action_tile "CH" "(setq CurView 8) (Click CurView)")
(action_tile "CT" "(setq CurView 9) (Click CurView)")
(action_tile "DI" "(setq CurView 10) (Click CurView)")
(action_tile "DH" "(setq CurView 11) (Click CurView)")
(action_tile "DT" "(setq CurView 12) (Click CurView)")
(action_tile "back21" "(done_dialog 2)")
(setq MoldTypeNext (start_dialog))
(cond
((= 0 MoldTypeNext)
;-------------------------------------------
;Select "Exit" and exit Program
;----------------------------- -------------
(setq IfExitMoldType nil)
(setq IfExitMoldSys nil)
)
((= 1 MoldTypeNext)
;-------------------------------------------
;Select "Next" and call "MoldSpec" Function
;-------------------------------------------
(MoldSpec)
)
((= 2 MoldTypeNext)
;-------------------------------------------
;Select "Back" and go back "MoldSys" Function
;-------------------------------------------
(setq IfExitMoldType nil)
)
)
)
)
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
;Get Three Plate Type System Mold Base Type Function
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
(defun MoldTypeTP( / LastView CurView IfExitMoldType ImageLst)
;----------------------------------------------------------
;Initialize Image list and set "MoldTypeNum" as "FAI" first
;----------------------------------------------------------
(setq ImageLst '("FAIV" "FCIV" "GAIV" "GCIV" "FAHV" "FCHV" "GAHV" "GCHV"))
(setq CurView 1)
;----------------------------
;Start dialog
;----------------------------
(setq IfExitMoldType T)
(while IfExitMoldType
(if (not (new_dialog "mold22" MoldDclId))
(exit)
)
(IniImage)
(setq LastView nil)
(Click CurView)
(action_tile "FAI" "(setq CurView 1) (Click CurView)")
(action_tile "FCI" "(setq CurView 2) (Click CurView)")
(action_tile "GAI" "(setq CurView 3) (Click CurView)")
(action_tile "GCI" "(setq CurView 4) (Click CurView)")
(action_tile "FAH" "(setq CurView 5) (Click CurView)")
(action_tile "FCH" "(setq CurView 6) (Click CurView)")
(action_tile "GAH" "(setq CurView 7) (Click CurView)")
(action_tile "GCH" "(setq CurView 8) (Click CurView)")
(action_tile "back21" "(done_dialog 2)")
(setq MoldTypeNext (start_dialog))
(cond
((= 0 MoldTypeNext)
;--------------------------------------------
;Select "Exit" and exit program
;--------------------------------------------
(setq IfExitMoldType nil)
(setq IfExitMoldSys nil)
)
((= 1 MoldTypeNext)
;--------------------------------------------
;Select "Next" and Call "MoldSpec" function
;--------------------------------------------
(MoldSpec)
)
((= 2 MoldTypeNext)
;-----------------------------------------------
;Select "Back" and go back to "MoldSys" function
;-----------------------------------------------
(setq IfExitMoldType nil)
)
)
)
)
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
;Get Pin Point Gate System Mold Base Type Function
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
(defun MoldTypePP( / LastView CurView IfExitMoldType ImageLst)
;----------------------------------------------------------
;Initialize Image list and set "MoldTypeNum" as "FAI" first
;----------------------------------------------------------
(setq ImageLst '("DAIV" "DBIV" "DCIV" "DDIV" "EAIV" "EBIV" "ECIV" "EDIV"))
(setq CurView 1)
;-----------------------------------
;Start dialog
;-----------------------------------
(setq IfExitMoldType T)
(while IfExitMoldType
(if (not (new_dialog "mold23" MoldDclId))
(exit)
)
(IniImage)
(setq LastView nil)
(Click CurView)
(action_tile "DAI" "(setq CurView 1) (Click CurView)")
(action_tile "DBI" "(setq CurView 2) (Click CurView)")
(action_tile "DCI" "(setq CurView 3) (Click CurView)")
(action_tile "DDI" "(setq CurView 4) (Click CurView)")
(action_tile "EAI" "(setq CurView 5) (Click CurView)")
(action_tile "EBI" "(setq CurView 6) (Click CurView)")
(action_tile "ECI" "(setq CurView 7) (Click CurView)")
(action_tile "EDI" "(setq CurView 8) (Click CurView)")
(action_tile "back21" "(done_dialog 2)")
(setq MoldTypeNext (start_dialog))
(cond
((= 0 MoldTypeNext)
(setq IfExitMoldType nil)
(setq IfExitMoldSys nil)
)
((= 1 MoldTypeNext)
(MoldSpec)
)
((= 2 MoldTypeNext)
(setq IfExitMoldType nil)
)
)
)
)
(defun IniImage()
(foreach Image ImageLst
(progn
(start_image Image)
(slide_image 0 0 (dimx_tile Image) (dimy_tile Image) (strcat "MoldBase(" Image ")"))
(end_image)
)
)
)
(defun Click(ViewNumber / ViewTemp)
;--------------------------------
;Defun Local Function
;--------------------------------
(defun ImageHighLight(Image)
(if (/= LastView Image)
(progn
(mode_tile Image 4)
(if LastView
(mode_tile LastView 4)
)
(setq LastView Image)
)
)
)
;--------------------------------
(setq ViewTemp (nth (- CurView 1) ImageLst))
(setq MoldTypeNum (substr ViewTemp 1 (- (strlen ViewTemp) 1)))
(ImageHighLight ViewTemp)
)
;********************************************************************************************************;
(defun MoldSpec(/ IfExitMoldSpec MoldSpecNext /*MoldSpecNum*/); aPThk bPThk sbPThk tpZ tpX tpY
;sbX sbY sbZ cpX cpY scr1X scr1Y scr1Num scr1D scr2X scr2Y
;scr2Num scr2D scr3X scr3Y scr3Y2 scr2Num scr2D gpnX gpnY gpnNum gpnD
;rpnX rpnY rpnNum rpnD bpZ stZ spZ rpZ erpZ epZ bpZ
;epX epY TapHaD TapHaI TapHaL TapHbD TapHbI TapHbL tpZ IfRpnNew
;IfAddSpg mb SpgHolDep)
(setq IfExitMoldSpec T)
(while IfExitMoldSpec
(if (not (new_dialog "mold3" MoldDclId))
(exit)
)
(mode_tile "SpecSel" 2)
(IniMoldSpec)
(action_tile "SpecSel" "(MoldSpecSel MoldSysNum)")
(action_tile "aPlateSel" "(PlateThkSel 1)")
(action_tile "bPlateSel" "(PlateThkSel 2)")
(action_tile "sbPlateSel" "(PlateThkSel 3)")
(action_tile "SpecValue" "(setq SpecValidNum $reason) (SpecVerify)")
(action_tile "aPlateThk" "(setq aPTValidNum $reason) (PTVerify 1)")
(action_tile "bPlateThk" "(setq bPTValidNum $reason) (PTVerify 2)")
(action_tile "sbPlateThk" "(setq sbPTValidNum $reason) (PTVerify 3)")
(action_tile "option" "(ResetRpn)")
(action_tile "back32" "(done_dialog 2)")
(setq MoldSpecNext (start_dialog))
(cond
((= 0 MoldSpecNext)
(setq IfExitMoldSpec nil)
(setq IfExitMoldType nil)
(setq IfExitMoldSys nil)
)
((= 1 MoldSpecNext)
(if (and MoldSpecNum aPThk bPThk sbPThk)
(progn
(setTapHoldSpec)
(MoldPosition)
)
)
)
((= 2 MoldSpecNext)
(setq IfExitMoldSpec nil)
)
)
)
)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -