Jump to content

PlotSheetCountReactor.lsp - Total Layout Variable for Titleblock


alanjt

Useful?  

16 members have voted

  1. 1. Useful?

    • Very useful
      11
    • Maybe possibly
      5
    • Nope
      0
    • What a bunch of crap b/w those parenthesis
      0


Recommended Posts

From the thread about trying to derive the total number of layouts in a drawing with Diesel, I decided to put this together. It was basically complete and posted in that thread, but I wanted to clean it up and officially post it for everyone. I don't know if anyone will have use for this, but I wanted to make sure everyone had a chance at it. Hell, it's worth loading. More than not, we use Sheet Set Manager and fill in attributes that way, but for drawings that have all the sheets in one file, I'm sure I'll be taking advantage of this.

 

This is a plot reactor that, when plot, publish, or preview are executed, will take the total number of layouts in a drawing (layoutlist) and save the number to variable: PlotSheetCount:Value. With the use of a Lisp Variable Field, the total sheet number attribute value will be updated to display the correct number.

 

PlotSheetCountReactor.gif

 

Will update if using a Lisp routine that utilizes (command "_.plot"), etc.

 

*** Reactor MUST be loaded every time for attribute to be updated. ***

 

Example (created in v2009): %%

Field.PNG

 

Place in a support path, and put the following in your acaddoc.lsp:

 (load "PlotSheetCountReactor.LSP" "PlotSheetCountReactor.LSP did not load!")

Additional version added. PlotSheetCountReactor-Diesel.lsp will update the users5 system variable. This way it will work with older versions (prior to additional of Lisp Variables to Fields and Fields completely). If you have a version older than 2005, but have RText (Express Tool), Rtext will accept Diesel expressions and this will also work.

 

This should cover everyone from 2000 and up.

 

Diesel expression: $(getvar,users5)

 

Field-Diesel.PNG

PlotSheetCountReactor.LSP

PlotSheetCountReactor-Diesel.LSP

Edited by alanjt
Link to comment
Share on other sites

Ah, shoot. Forgot I used a LISP to fill in that in my title block.:cry:

Use this in my border

$(upper,$(getvar,"dwgname") "<"$(getvar,"ctab")">")$(edtime, 0, MONTH DD"," YYYY - H:MMam/pm) 

Link to comment
Share on other sites

Ah, shoot. Forgot I used a LISP to fill in that in my title block.:cry:

Use this in my border

$(upper,$(getvar,"dwgname") "<"$(getvar,"ctab")">")$(edtime, 0, MONTH DD"," YYYY - H:MMam/pm) 

LoL

Ok, I was about to feel like a complete moron. I was quite sure only Diesel woked in R-Text. I have almost the same thing in out titleblocks.

Link to comment
Share on other sites

2 things:

 

Firstly I don't have that field to use the reactor. How do i add it or can i do that???

 

Secondlt CAB, does your lisp to fill in the titleblock reference a txt file or how does it work????? I want to do something like that too????

Link to comment
Share on other sites

2 things:

 

Firstly I don't have that field to use the reactor. How do i add it or can i do that???

 

Secondlt CAB, does your lisp to fill in the titleblock reference a txt file or how does it work????? I want to do something like that too????

 

Really??? So Lisp variables weren't added in fields until 2008?

Link to comment
Share on other sites

2 things:

 

Firstly I don't have that field to use the reactor. How do i add it or can i do that???

 

Secondlt CAB, does your lisp to fill in the titleblock reference a txt file or how does it work????? I want to do something like that too????

Mine is Hard Coded.

Link to comment
Share on other sites

Ok, since Field Lisp variables weren't available in older version I've added an alternate version that will update the "users5" system variable. With the use of this one, the user can display a Field Diesel expression (or use of RText for versions older than 2005) (ie: $(getvar,users5) ).

 

Hopefully this should take care of everyone from 2000 and up.

Link to comment
Share on other sites

This is great. I have been trying to put in a field that will give me the number of the current layout. Any ideas??

 

Thanks, hope it helps. :)

Best option is using the ctab variable, but you are forced to name your layout tab just that. I use this method when possible.

Link to comment
Share on other sites

  • 8 months later...

Love10086, the red "Report Post" button that you have been clicking is for reporting problems in the forum, as stated on the page that opens after you click the button:

 

Note: This is ONLY to be used to report spam, advertising messages, and problematic (harassment, fighting, or rude) posts.

 

The red button is not there to help you get answers to questions. Please do not click the red button unless you have a serious problem to report.

Link to comment
Share on other sites

  • 4 years later...
hi sorry for refresh old thread but i would like to try PlotSheetCountReactor.lsp but i don't know how I can get it

Forgot about this old program. I have attached the files in the first post.

Link to comment
Share on other sites

  • 2 years later...
From the thread about trying to derive the total number of layouts in a drawing with Diesel, I decided to put this together. It was basically complete and posted in that thread, but I wanted to clean it up and officially post it for everyone. I don't know if anyone will have use for this, but I wanted to make sure everyone had a chance at it. Hell, it's worth loading. More than not, we use Sheet Set Manager and fill in attributes that way, but for drawings that have all the sheets in one file, I'm sure I'll be taking advantage of this.

 

This is a plot reactor that, when plot, publish, or preview are executed, will take the total number of layouts in a drawing (layoutlist) and save the number to variable: PlotSheetCount:Value. With the use of a Lisp Variable Field, the total sheet number attribute value will be updated to display the correct number.

 

[ATTACH]14656[/ATTACH]

 

Will update if using a Lisp routine that utilizes (command "_.plot"), etc.

 

*** Reactor MUST be loaded every time for attribute to be updated. ***

 

Example (created in v2009): %%

[ATTACH]14654[/ATTACH]

 

Place in a support path, and put the following in your acaddoc.lsp:

 (load "PlotSheetCountReactor.LSP" "PlotSheetCountReactor.LSP did not load!")

Additional version added. PlotSheetCountReactor-Diesel.lsp will update the users5 system variable. This way it will work with older versions (prior to additional of Lisp Variables to Fields and Fields completely). If you have a version older than 2005, but have RText (Express Tool), Rtext will accept Diesel expressions and this will also work.

 

This should cover everyone from 2000 and up.

 

Diesel expression: $(getvar,users5)

 

[ATTACH]14698[/ATTACH]

 

Very Nice code @Alanjt

 

I liked so much, thanks for sharing.

 

Can I change the code for 2 numbers?

e.g: 05 or 09

 

Thanks

Link to comment
Share on other sites

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...