Jump to content

Recommended Posts

Posted

Hello all. I need a lisp that will merge all layouts, that start with a certain name, into one PDF file.

 

I have already made some progress with this Lisp. With the dwgprops I get information about the current file path, which I then merge all with the stract command. This also works, only the command "-Export" "ak" can only print one sheet.

 

The number of layouts that start with "Plan..." are always different.

 

Does anyone have an idea which command works instead for publish all Layouts, that beginns with the same name?

The -publish command always asks me for a dsd file.

 

image.png.bec0f038420772b7fb10c8e6a21e4e12.png

 

 

(defun c:Documentsheets ( / pdfName )
  
  (vl-load-com)
  
;--------- get variabel für contact - number:

      (setq acadObject (vlax-get-acad-object))
      (setq acadDocument (vla-get-ActiveDocument acadObject))
    
        (setq dProps (vlax-get-Property acadDocument 'SummaryInfo))
        (vla-getCustomByIndex dProps 4 'myValue1 'myValue2)
        
        (setq contact myValue2)       
  
  (princ)

;--------- get variable for order - number:

      (setq acadObject (vlax-get-acad-object))
      (setq acadDocument (vla-get-ActiveDocument acadObject))
    
        (setq dProps (vlax-get-Property acadDocument 'SummaryInfo))
        (vla-getCustomByIndex dProps 5 'myValue1 'myValue2)
        
        (setq order myValue2)       
  
  (princ)
  
  ;--------
  
  (setq Pathone "\\\\company.lan\\xyz\\erp\\land\\contact\\")
  (setq Pathtwo "\\order\\")
  (setq Paththree "\\folder\\")
  
  ;--------

  (command "_Qsafe")
  
  (foreach layname (vl-remove-if-not
		     '(lambda (ln)
			(vl-some '(lambda (n)
				    (wcmatch ln n)
				  )
				 '("Plan*")   
			)
		      )
		     (layoutlist)
		   )
    (setvar "ctab" layname)
    (setq pdfName
              (strcat Pathone Contact Pathtwo Order Paththree
              (strcat order "_Drawing")
              )
    )           
  )
    (if	(findfile pdfName)
      (command "-EXPORT" "PDF" "Ak" "N" pdfName "J")
      (command "-EXPORT" "PDF" "Ak" "N" pdfName)
    )
)

 

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...