Author Topic: Rimless PDF  (Read 2064 times)

0 Members and 1 Guest are viewing this topic.

matthias312

  • Guest
Rimless PDF
« on: November 11, 2014, 11:17:35 AM »
Hi, im looking for a program / code to print rimless PDFs.
This is what i made, but i have big trouble because the pdfs often come with the wrong direction

I make a new plotconfig with (vla-add( ....)) and modify it with following methods
Code: [Select]
(defun plotWindow (doc config / point1 point2 pointTemp1 pointTemp2 entlistConfig)

    (setq point1 (vlax-variant-value (vla-GetPoint (vla-get-Utility doc) nil "Links unten")))

    ;; 3d-Punkt zu 2d-Punkt
    (setq pointTemp1 (vlax-make-safearray vlax-vbDouble '(0 . 1)))
    (vlax-safearray-put-element pointTemp1 0 (vlax-safearray-get-element point1 0))
    (vlax-safearray-put-element pointTemp1 1 (vlax-safearray-get-element point1 1))
   
    (setq point2 (vlax-variant-value (vla-GetCorner (vla-get-Utility doc) point1 "Rechts oben")))

    ;; 3d-Punkt zu 2d-Punkt
    (setq pointTemp2 (vlax-make-safearray vlax-vbDouble '(0 . 1)))
    (vlax-safearray-put-element pointTemp2 0 (vlax-safearray-get-element point2 0))
    (vlax-safearray-put-element pointTemp2 1 (vlax-safearray-get-element point2 1))
   
    (vla-SetWindowToPlot config pointTemp1 pointTemp2)
   
    ;; Fenstermodus beim Drucken
    (vla-put-PlotType config acWindow)
    (list (vlax-safearray->list pointTemp1)(vlax-safearray->list pointTemp2))
    )


(defun paperSize (doc config lstPoints / pt1 pt2)
    (setq pt1 (nth 0 lstPoints)
  pt2 (nth 1 lstPoints)
  deltaX (- (car pt2) (car pt1))
  deltaY (- (cadr pt2)(cadr pt1))
  )
(vla-put-ConfigName config "PDF24 PDF.pc3")

   
    (if (= (getvar "ctab") "Model")
(modPaperSize)
)

    (vla-put-PlotOrigin config (vlax-safearray-fill (vlax-make-safearray vlax-vbDouble '(0 . 1)) (list 0.0 0.0)))
   
    (setq entlistConfig  (entget (vlax-vla-object->ename config))
  entlistConfig  (entmod (subst (cons 44 deltaX) (assoc 44 entlistConfig) entlistConfig))
  entlistConfig  (entmod (subst (cons 45 deltaY) (assoc 45 entlistConfig) entlistConfig))
  )
    (princ)
    )

Would be nice if someone had an idea how i can go on to print the pdfs ...
mfg matthias