Jump to content

PlotSheetCountReactor.lsp - Total Layout Variable for Titleblock


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

Posted (edited)

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
Posted
I'm still using R-Text:roll:

I still use it myself, but I thought R-Text only accepted Diesel?

Posted

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) 

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

Posted

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

Posted
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?

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

Posted

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.

Posted

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

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

  • 8 months later...
Posted

But where is the "PlotSheetCountReactor-Diesel.lsp",how can i down it??

Posted

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.

  • 4 years later...
Posted

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

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

  • 2 years later...
Posted
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

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