lisp file for redefining blocks and exporting attributes

lisp file for redefining blocks and exporting attributes

m.meuris
Participant Participant
623 Views
6 Replies
Message 1 of 7

lisp file for redefining blocks and exporting attributes

m.meuris
Participant
Participant

Hi 

I would like to combine redefine 3 named blocks and synchronise attributes and export attributes to a text file into one lisp file.

for automatisation of as built drawings .

so that i can batch process the lisp

I found examples for redefine , and for attout but would like to combine it.

block names :PARTLIST1 , PARTLIST2, Tittelblock standaard

 

 

please help 

thank you

 

 

0 Likes
624 Views
6 Replies
Replies (6)
Message 2 of 7

m.meuris
Participant
Participant

Ifound out-att on this forum and combined it with what i had ...

 

My follow up question : 

 

I would like to script this , so that there is no need for manual interaction . is that possible ?

can i add a publish to this ? 

or print to pdf ? 

Or is it simpler to batchplot the files after saving

 

(defun c:out-att ()
(load "attout")
(command "-insert" "PARTLIST1=")(COMMAND)
(command "-insert" "PARTLIST2=")(COMMAND)
(command"attsync""n""PARTLIST1")
(command"attsync""n""PARTLIST2")


(setq fna (strcat (getvar "dwgprefix")
(acet-filename-path-remove (acet-filename-ext-remove (getvar "dwgname")))
".txt"
))
(setq ss (ssget "X" '((0 . "INSERT") (66 . 1))))
(bns_attout fna ss)
(command "qsave")
)

 

0 Likes
Message 3 of 7

Sea-Haven
Mentor
Mentor

Google "print to pdf lisp Autocad" so many examples.

0 Likes
Message 4 of 7

m.meuris
Participant
Participant

still wandering what is best practice : print function in the lisp 

or seperate use of publish for batch plotting.

 

I need to process a lot of drawings , all with a page setup with printstyle included , 

A4->A0 depending on the layout.

 

once the batch is done I was thinking of making a button with the command for the lisp followed by publish, so that we always create a text file and a pdf .

0 Likes
Message 5 of 7

Sea-Haven
Mentor
Mentor

Google "Maratovich plotting autocad"

 

Is there a reason for 100  dwgs rather than 1 - 2 using layouts.

0 Likes
Message 6 of 7

m.meuris
Participant
Participant

For the automisation of As Built drawings with charge numbers we want our blocks to have the additional charge number attribute and a pdf to be send with the attout file to our quality department, going back 2 years in time for all drawings of the last 2 years.

0 Likes
Message 7 of 7

Sea-Haven
Mentor
Mentor

As this sounds like an archiving problem and not must do right now ie have a little bit of time, then sort of easy just do a script opens dwg, atts exported then plot pdf. 

 

Inside the plot pdf can read title block etc so print as correct size else just do all to 1 size and use Fit. AS your metric A3 would be ideal size as a 1 size fits all.

0 Likes