Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/01/2025 in all areas

  1. I think you will find a solution on your own: bravo!
    1 point
  2. I've changed a few things in your code to make it work. But you'll have to adjust the viewport dimensions because you have them at maximum, at the edge of the paper. (defun c:CreaA2Layout (/ acadObj doc layouts newLayout pspace vp) (vl-load-com) (setq acadObj (vlax-get-acad-object)) (setq doc (vla-get-ActiveDocument acadObj)) (setq layouts (vla-get-Layouts doc)) (setq newLayout (vla-Add layouts "A2-Layout")) (vla-put-ConfigName newLayout "DWG To PDF.pc3") (vla-put-StyleSheet newLayout "monochrome.ctb") (vla-put-PlotType newLayout 5) (vla-put-CanonicalMediaName newLayout "ISO_full_bleed_A2_(594.00_x_420.00_mm)";"ISO_A4_(297.00_x_210.00_MM)" ) (vla-put-PaperUnits newLayout acMillimeters) (vla-put-PlotType newLayout acExtents) (vla-put-CenterPlot newLayout :vlax-true) (vla-put-PlotRotation newLayout ac0degrees) ;;; (vla-Activate newLayout) (vla-put-activeLayout doc newLayout) (setq pspace (vla-get-Block newLayout)) ;; Viewport ;;; (setq vp ;;; (vla-AddObject ;;; pspace ;;; "AcDbViewport" ;;; (vlax-3D-point '(0 0 0)) ;;; ) ;;; ) (setq vp (vlax-ename->vla-object (ssname (ssget "x" (list '(0 . "VIEWPORT") (cons 410 "A2-Layout") '(69 . 2))) 0))) (vla-put-Width vp 594) (vla-put-Height vp 420) (vla-put-DisplayLocked vp :vlax-false) (vla-put-customscale vp 1) (vla-put-DisplayLocked vp :vlax-true) (princ) )
    1 point
  3. Me personally your going down the wrong path you have your title block in a layout at true size a A1 841x594 a A2 594x420, then you make your mview inside that title block, then set correct scale. The rectangs in model space are a scaled representative of the viewport size. Think about it. So again I need the size of your viewports in Each title block with the title block at true size. A A2 will be like 584x397 Did you look at the movie ?
    1 point
×
×
  • Create New...