This is the lisp
(defun c:gml ( / BLK BLK_NO CNT CORD_QNTY DOC E INS_PT ME_BLOCK MSG N OSM OSZ PRCL_N PRCL_NO SS
)
; insert block and modify insertion point round of 5
(vl-load-com)
(defun *error* ( m ) (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*") (princ (strcat "\n** Error: " msg " **")))
(if (= 'int (type osz)) (setvar 'osnapz osz) ) (if (= 'int (type osm)) (setvar 'osmode osm) ) (princ))
(if (= 0 (getvar "TILEMODE")) (setvar "TILEMODE" 1))
(setq doc (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object) )))
(if
(setq blk (ssget "_X" '((0 . "INSERT") (2 . "Frame1") (66 . 1))))
(progn
(setq blk (vlax-ename->vla-object (ssname blk 0)))
(if (setq osz (getvar 'osnapz)) (setvar 'osnapz 0))
(setq osm (getvar 'osmode))
(setvar 'osmode 8) (setq cnt 1)
(setq blk_no (getstring "\nWhat is Block No? "))
(LM:vl-SetAttributeValue blk "BLOCK" blk_no)
(setq prcl_no (getstring "\nWhat is Parcel No? "))
(setq cord_Qnty (getstring "\nHow many coordinate point for parcel? "))
(setq ins_p (getpoint "\nPick center of parcel: "))
(LM:vl-SetAttributeValue blk "BARCIL" prcl_no)
(setq ins_pt (vlax-3d-point (list (LM:Round (nth 0 ins_p) 5) (LM:Round (nth 1 ins_p) 5) 0.0)))
(if (not (tblsearch "BLOCK" "GM-Limits"))
(progn
(setq me_block (vla-insertblock doc ins_pt (strcat "c:\\GMC\\" "GM-Limits") 1.0 1.0 1.0 0.0 )))
(setq me_block (vla-insertblock doc ins_pt "GM-Limits" 1.0 1.0 1.0 0.0 )))
(if (not (vlax-object-released-p me_block)) (vlax-release-object me_block))
(P_Txt prcl_no ins_p)
) ;progn
(princ "\nBlock ( Frame1 ) not found."))
(setvar "TILEMODE" 0)
(princ)
)
(defun LM:vl-SetAttributeValue ( block tag value )
; Lee Mac, Copyright © 2010 - www.lee-mac.com
(setq tag (strcase tag))
(vl-some (function (lambda ( attrib ) (if (eq tag (strcase (vla-get-TagString attrib)))
(progn (vla-put-TextString attrib value) value)))) (vlax-invoke block 'GetAttributes))) ;defun LM:vl-SetAttributeValue
(defun LM:vl-SetAttributeValues ( block lst / pair )
; Lee Mac, Copyright © 2010 - www.lee-mac.com
(foreach attrib (vlax-invoke block 'GetAttributes) (if (setq pair (assoc (strcase (vla-get-tagstring attrib)) lst))
(vla-put-textstring attrib (cdr pair))))) ;defun LM:vl-SetAttributeValues
(defun LM:Round (num dp / fac rm)
(setq fac (float (expt 10 dp)) rm (rem (setq num (* fac num)) 1))
(/ (cond ( (zerop rm) (fix num)) ( (< 0.5 rm) (1+ (fix num))) ( (+ (/ 5 fac) (fix num)))) fac)) ;defun LM:Round
(defun P_Txt (str i_pt)
(entmakex (list
(cons 0 "TEXT") ;***
(cons 1 (strcat "Parcel No. " str)) ;* (the string itself)
(cons 6 "BYLAYER") ; Linetype name
(cons 7 "STANDARD") ;* Text style name, defaults to STANDARD, not current
(cons 8 "Site_Surrondings") ; layer
(cons 10 i_pt) ;* First alignment point (in OCS)
(cons 39 0.0) ; Thickness (optional; default = 0)
(cons 40 2.0) ;* Text height
(cons 41 1.0) ; Relative X scale factor, Width Factor, defaults to 1.0
(cons 50 0.0) ; Text rotation ange
(cons 51 0.0) ; Oblique angle
(cons 62 256) ; color
(cons 71 0) ; Text generation flags
(cons 72 0) ; Horizontal text justification type
(cons 73 2) ; Vertical text justification type
(cons 210 (list 0.0 0.0 1.0)))))
(princ "\n:: GML.lsp | Version 1.0 | Type GML to invoke the lisp :")