(defun c:mpp2
(/ bim blk xyz
)
(command "erase" "All" "") ;Erase template drawing text
(c:on) ;Turn osnaps on
(command "Pasteclip" "0,0,0") ;Paste model
(setq blk
"BIM_Origin+") ;Set variable to block name (sssetfirst nil (getblockselection blk
)) ;Selects BIM_Origin+ block ) ;_ End assoc
) ;_ End cdr
) ;Find insertion point of BIM Origin block
(command "move" "all" "" xyz
"0,0,0")
(command "_-vports" "2" "V") ;Viewport 2 (Vertical) (command "_vscurrent" "Realistic") ; (command "zoom" "E" "zoom" ".90x") ; (command "zoom" "E" "zoom" ".90x") ;
) ;_ end of defun
;;--Subroutine---------------------------------------------------------------------------------------------------
;; Get Anonymous References - Lee Mac
;; Returns the names of all anonymous references of a block.
;; blk - [str] Block name for which to return anon. references
(defun lm:getanonymousreferences
(blk
/ ano def lst rec ref
) "block"
) ;_ End tblobjname
) ;_ End entget
) ;_ End assoc
) ;_ End cdr
) ;_ End entget
) ;_ End setq
) ;_ End and
) ;_ End and
) ;_ End and
) ;_ End if
) ;_ End while
) ;_ End if
) ;_ End while
) ;_ End defun
;; Effective Block Name - Lee Mac
;; ent - [ent] Block Reference entity
(defun lm:al
-effectivename
(ent
/ blk rep
) ) ;_ End entget
) ;_ End assoc
) ;_ End cdr
'("AcDbBlockRepBTag")
) ;_ End entget
) ;_ End assoc
) ;_ End cdadr
) ;_ End setq
) ;_ End and
) ;_ End if
) ;_ End if
blk
) ;_ End defun
(defun getblockselection
(blk
) (lm:getanonymousreferences blk)
) ;_ End mapcar
) ;_ End cons
) ;_ End apply
) ;_ End cons
) ;_ End list
) ;_ End ssget
) ;_ End defun
;;--End Subroutine-----------------------------------------------------------------------------------------------