我想出来了!找到此资源
这是这一行的更新代码。当我做完所有事情后我会汇报的。。。
- (defun c:TB ( / doc db si opt titletop titlemiddle titlebottom row
- 1rowrev 1rowyy 1rowmm 1rowdd 1rowdesc 1rowby 1rowchk 1roweng 1rowapp
- 2rowrev 2rowyy 2rowmm 2rowdd 2rowdesc 2rowby 2rowchk 2roweng 2rowapp
- 3rowrev 3rowyy 3rowmm 3rowdd 3rowdesc 3rowby 3rowchk 3roweng 3rowapp
- 4rowrev 4rowyy 4rowmm 4rowdd 4rowdesc 4rowby 4rowchk 4roweng 4rowapp
- )
- (vl-load-com)
- (setq acadObject (vlax-get-Acad-Object))
- (setq acadDocument (vla-get-Activedocument acadObject))
- (setq dProps (vlax-get-property acadDocument 'Summaryinfo))
- (if (setq Opt
- (getint
- "\nDo you want to: 1- Update Titleblock 2- Update RevBlock 3- Update Drawing Titles: "
- )
- );;user input for variable "opt"
- (progn
- (cond
- ((= opt 1);;if user picks to update titleblock
- (setq titletop (getstring "\nWhat is title top? "))
- (setq titlemiddle (getstring "\nWhat is title middle? "))
- (setq titlebottom (getstring "\nWhat is title bottom? "))
- )
- ((= opt 2);;if user picks to update revblock
- (setq
- row (getint "\nWhich revision row do you wish to edit? ")
- )
- (progn
- (cond
- ((= row 1)
- (setq 1rowrev (getstring "\n1st row rev: "))
- (setq 1rowyy (getstring "\n1st row year: "))
- (setq 1rowmm (getstring "\n1st row month: "))
- (setq 1rowdd (getstring "\n1st row day: "))
- (setq 1rdesc (getstring T "\n1st row description: "))
- (setq 1rowby (getstring "\n1st row by: "))
- (setq 1rowchk (getstring "\n1st row chk: "))
- (setq 1roweng (getstring "\n1st row eng: "))
- (setq 1rowapp (getstring "\n1st row app: "))
- (vla-SetCustomByIndex dProps 7 "1RREV" 1rowrev)
- );;end row=1
- ((= row 2)
- (setq 2rowrev (getstring "\n2nd row rev: "))
- (setq 2rowyy (getstring "\n2nd row year: "))
- (setq 2rowmm (getstring "\n2nd row month: "))
- (setq 2rowdd (getstring "\n2nd row day: "))
- (setq 2rdesc (getstring T "\n2nd row description: "))
- (setq 2rowby (getstring "\n2nd row by: "))
- (setq 2rowchk (getstring "\n2nd row chk: "))
- (setq 2roweng (getstring "\n2nd row eng: "))
- (setq 2rowapp (getstring "\n2nd row app: "))
- );;end row=2
- ((= row 3)
- (setq 3rowrev (getstring "\n3rd row rev: "))
- (setq 3rowyy (getstring "\n3rd row year: "))
- (setq 3rowmm (getstring "\n3rd row month: "))
- (setq 3rowdd (getstring "\n3rd row day: "))
- (setq 3rdesc (getstring T "\n3rd row description: "))
- (setq 3rowby (getstring "\n3rd row by: "))
- (setq 3rowchk (getstring "\n3rd row chk: "))
- (setq 3roweng (getstring "\n3rd row eng: "))
- (setq 3rowapp (getstring "\n3rd row app: "))
- );;end row=3
- ((= row 4)
- (setq 4rowrev (getstring "\n4th row rev: "))
- (setq 4rowyy (getstring "\n4th row year: "))
- (setq 4rowmm (getstring "\n4th row month: "))
- (setq 4rowdd (getstring "\n4th row day: "))
- (setq 4rdesc (getstring T "\n4th row description: "))
- (setq 4rowby (getstring "\n4th row by: "))
- (setq 4rowchk (getstring "\n4th row chk: "))
- (setq 4roweng (getstring "\n4th row eng: "))
- (setq 4rowapp (getstring "\n4th row app: "))
- );;end row=4
- );;end cond
- );; end progn
- );;end opt 2
- ((= opt 3);;if user picks to update drawing titles, still figuring this section out
- )
- );;end cond
- );;end 1st progn
- );;end 1st if
- );;end defun
|