![]() ![]() (vla-put-TextAlignmentPoint nw_txt (vlax-3d-point pt_ins)) (vla-put-Rotation nw_txt (angle (list (car ob_lst_pt) (cadr ob_lst_pt)) (list (caddr ob_lst_pt) (cadddr ob_lst_pt)))) (setq nw_txt (vla-AddText Space (strcat " Scale 1/" (rtos ech 2 0)) (vlax-3d-point pt_ins) (* 2 htx))) (setq pt_ins (polar pt_ins ( (* pi 0.25) (angle (list (car ob_lst_pt) (cadr ob_lst_pt)) (list (caddr ob_lst_pt) (cadddr ob_lst_pt)))) (* htx 10))) (vla-put-Alignment nw_txt acAlignmentMiddleRight) ![]() (if (vlax-invoke nw_pl 'IntersectWith nw_txt acExtendThisEntity) (vla-put-TextAlignmentPoint nw_txt (vlax-3d-point el)) (vla-put-Alignment nw_txt acAlignmentMiddleLeft) (setq nw_txt (vla-AddText Space str (vlax-3d-point el) htx)) (setq str (strcat " " (rtos (cadr el) 2 0) " ") ori_txt 0.0) (vla-put-patternscale hatch (/ ech 10.0)) (vlax-invoke hatch 'AppendOuterLoop (list nw_pl_in)) (setq hatch (vla-AddHatch Space acHatchPatternTypeCustomDefined "QUADISO" :vlax-True)) (vla-put-patternscale hatch_out (/ ech 10.0)) (vlax-invoke hatch_out 'AppendInnerLoop (list nw_pl_out)) (vlax-invoke hatch_out 'AppendOuterLoop (list nw_pl)) (setq hatch_out (vla-AddHatch Space acHatchPatternTypeCustomDefined "REPQUADISO" :vlax-True)) (setq nw_pl_in (vlax-ename->vla-object (entlast))) (setq nw_pl_out (vlax-ename->vla-object (entlast))) Pt_ins (list (car ob_lst_pt) (cadr ob_lst_pt))įormat_scale (/ 1.0 (vlax-get (vlax-ename->vla-object ent) 'CustomScale)) (write-line "*REPQUADISO,Repere du quadrillage lambert" f_pat) (setq f_pat (open (strcat (getvar "ROAMABLEROOTPREFIX") "support\\REPQUADISO.pat") "w")) (write-line "*QUADISO,Quadrillage lambert" f_pat) (setq f_pat (open (strcat (getvar "ROAMABLEROOTPREFIX") "support\\QUADISO.pat") "w")) (vlax-put (vla-add (vla-get-layers AcDoc) "GRID") 'color 7) (list 'FontFile 'Height 'ObliqueAngle 'Width 'TextGenerationFlag) (setq nw_style (vla-add (vla-get-textstyles AcDoc) "$GRID")) (vla-put-Origin save_ucs (vlax-3d-point (getvar "UCSORG"))) UCS (vla-get-UserCoordinateSystems AcDoc) (setq AcDoc (vla-get-ActiveDocument (vlax-get-acad-object))) ![]() (mapcar '(lambda (p) (cons 10 p)) lst_pt) (vlax-get (vlax-ename->vla-object ent) 'CustomScale) Pt_v (cdr (assoc 10 (setq dxf_ent (entget (setq ent (ssname js 0)))))) (defun c:ViewPort2Grid ( / js n pt_v l h lst_pt js_obj nw_pl unit_draw AcDoc Space UCS save_ucs WSC nw_style f_pat ob_lst_pt pt_ins format_scale ech hrtx nw_pl_out nw_pl_in hatch_out hatch lst_pt str ori_txt nw_txtpt_ins) (l-coor2l-pt (if flag (cdddr lst) (cddr lst)) flag) (cons (list (car lst) (cadr lst) (if flag (caddr lst) 0.0)) I have making this for meter (initially for French Lambert) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |