alanjt Posted October 2, 2009 Share Posted October 2, 2009 (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. 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): %% 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) PlotSheetCountReactor.LSP PlotSheetCountReactor-Diesel.LSP Edited October 6, 2014 by alanjt Quote Link to comment Share on other sites More sharing options...
CAB Posted October 4, 2009 Share Posted October 4, 2009 I'm still using R-Text:roll: Quote Link to comment Share on other sites More sharing options...
alanjt Posted October 4, 2009 Author Share Posted October 4, 2009 I'm still using R-Text:roll: I still use it myself, but I thought R-Text only accepted Diesel? Quote Link to comment Share on other sites More sharing options...
CAB Posted October 4, 2009 Share Posted October 4, 2009 Ah, shoot. Forgot I used a LISP to fill in that in my title block. Use this in my border $(upper,$(getvar,"dwgname") "<"$(getvar,"ctab")">")$(edtime, 0, MONTH DD"," YYYY - H:MMam/pm) Quote Link to comment Share on other sites More sharing options...
alanjt Posted October 4, 2009 Author Share Posted October 4, 2009 Ah, shoot. Forgot I used a LISP to fill in that in my title block.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. Quote Link to comment Share on other sites More sharing options...
woodman78 Posted October 5, 2009 Share Posted October 5, 2009 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???? Quote Link to comment Share on other sites More sharing options...
alanjt Posted October 5, 2009 Author Share Posted October 5, 2009 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? Quote Link to comment Share on other sites More sharing options...
CAB Posted October 5, 2009 Share Posted October 5, 2009 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. Quote Link to comment Share on other sites More sharing options...
alanjt Posted October 5, 2009 Author Share Posted October 5, 2009 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. Quote Link to comment Share on other sites More sharing options...
woodman78 Posted October 7, 2009 Share Posted October 7, 2009 This is great. I have been trying to put in a field that will give me the number of the current layout. Any ideas?? Quote Link to comment Share on other sites More sharing options...
alanjt Posted October 7, 2009 Author Share Posted October 7, 2009 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. Quote Link to comment Share on other sites More sharing options...
love10086 Posted June 22, 2010 Share Posted June 22, 2010 But where is the "PlotSheetCountReactor-Diesel.lsp",how can i down it?? Quote Link to comment Share on other sites More sharing options...
Cad64 Posted June 24, 2010 Share Posted June 24, 2010 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. Quote Link to comment Share on other sites More sharing options...
mariothc Posted October 3, 2014 Share Posted October 3, 2014 hi sorry for refresh old thread but i would like to try PlotSheetCountReactor.lsp but i don't know how I can get it Quote Link to comment Share on other sites More sharing options...
alanjt Posted October 6, 2014 Author Share Posted October 6, 2014 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. Quote Link to comment Share on other sites More sharing options...
Madruga_SP Posted December 8, 2016 Share Posted December 8, 2016 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.