|
(defun c:test()
(setvar "blockeditlock" 0)
(setq blk (Vlax-Invoke-Method (Vlax-Get (Vlax-Get (Vlax-Get-Acad-Object) 'ActiveDocument)
'Blocks) 'Add (vlax-3d-point '(0 0 0)) "NewDynamicBlock_Test"))
(setq line(Vlax-Invoke-Method blk 'AddLine (Vlax-3d-Point '(0 0)) (Vlax-3d-Point '(1 1)) ))
(Vlax-Invoke-Method (Vlax-Get (Vlax-Get (Vlax-Get-Acad-Object) 'ActiveDocument) 'ModelSpace) 'InsertBlock (Vlax-3d-Point '(0 0)) "NewDynamicBlock_Test" 1 1 1 0 )
(setq ss (ssadd (entlast) (ssadd)))
(Vlax-Invoke-Method (Vlax-Get-Acad-Object) 'ZoomWindow (Vlax-3d-Point '(0 0)) (Vlax-3d-Point '(1 1)) )
(command "_.Bedit" (entlast) "NewDynamicBlock_Test")
(command "_BParameter" "L" '(0 0) '(1 0) '(1 0) 2)
(command "_BActionTool" "S" (nentselp "" (list 0 0)) ss "" (list 0 0))
(command "_Bclose" "S")
) |
|