马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
本帖最后由 st788796 于 2013-7-13 18:07 编辑
The STARTUP system variable and the StartUpType environment variableBy Gopinath Taget
With the value of the STARTUP system variable set to 0, the user is only given the option of using a template. If it was set to 1, this would enable a user to
1) start a drawing from scratch,
2) use a template, or
3) use a wizard. You can of course control this programatically.- (defun-q MyStartup ( / app doc)
- (vl-load-com)
- (setq app (vlax-get-acad-object)
- doc (vla-get-activedocument app)
- ) ;setq
- (if (= (substr (vlax-variant-value
- (vla-getvariable doc "ACADVER")) 1 2) "17")
- (vla-setvariable doc "STARTUP"
- (vlax-make-variant 1 vlax-vbInteger))
- )
- (princ)
- )
- (setq S::STARTUP (append S::STARTUP MYSTARTUP))
You can change the default option for the dialog by setting the StartUpType variable as shown below: - ;To start from Scratch
- (setenv "StartUpType" "Scratch")
- ;To use a Template
- (setenv "StartUpType" "T?emplate")
- ;To use a Wizard
- (setenv "StartUpType" "Wizard")
复制代码 |