 - ;;我写了<钢板重量计算器>http://bbs.mjtd.com/thread-107027-1-1.html,为了显示重量,便于拷贝,写了
- ;;一个对话框,newer版主曰,用OpenDcl,可惜我不会。用下面的代码也倒是一个简单办法
- ;;示例(HH:InputBox "5.3")
- (defun HH:InputBox (weight / STR)
- (setq str (VL-PRIN1-TO-STRING weight))
- (setq str (strcat "dim ret \n ret=InputBox(\"显示重量,便于拷贝\",\"重量显示\"," str ") "))
- (or *wscript*
- (setq *wscript* (vlax-create-object "ScriptControl"))
- )
- (vlax-put *wscript* 'language "vbs")
- (vlax-invoke-method *wscript* 'ExecuteStatement str)
- (vlax-invoke-method *wscript* 'eval "ret")
- )
|