Total Dwg Files / Total Sheet Count

Total Dwg Files / Total Sheet Count

paulmartin_
Contributor Contributor
3,297 Views
8 Replies
Message 1 of 9

Total Dwg Files / Total Sheet Count

paulmartin_
Contributor
Contributor

As far as I am aware, there is no solution to use DIESEL to count the number of dwg files in a directory correct? I just wanted to confirm this before I continue endlessly researching this topic as I have done thus far. What about in VB? I'm familiar with DIESEL, but not VB. The only reason I don't want to use sheet set manager is because I'm not familiar with it and neither is anyone I work with. It won't be very popular and most would break it I'm sure or refuse to use it. I am hoping that someone somewhere has a DIESEL program solution to display Sheet 1/XX in attempting to figure out what XX is (total sheet count) in the file directory where the dwg files reside. Thanks in advance. 

0 Likes
Accepted solutions (1)
3,298 Views
8 Replies
Replies (8)
Message 2 of 9

Ranjit_Singh
Advisor
Advisor

Sheetsetmanager has lot more use then just counting the number of drawings. Plus, it can contain drawings from more than one directory. You should give it a try.

Maybe some one has a diesel solution. Meanwhile, this should give you total number of files using LISP

(length (vl-directory-files  (getvar 'dwgprefix) "*.dwg"))

 

0 Likes
Message 3 of 9

paulmartin_
Contributor
Contributor

I'd love to give sheetsetmanager a try, but I don't think I will be able to implement it across my department in creating drawings. I seem to be far more advanced at AutoCAD then the rest. All I'm trying to do is automate the title block at this point in time. We use model tabs for every drawing here also, which isn't supported in SSM.

 

Thank you for the Lisp code though! My company uses AutoCADLT though with one license of the full AutoCAD. My question is, if I create a block (titleblock) that runs a lisp code each time it opens or is inserted (don't know how I would do that yet, but read it is possible) would it not work in AutoCADLT? I would obviously create and implement the lsp code in the full AutoCAD  version.

 

I am hoping that a DIESEL option is available for this, but it really doesn't seem so as I've searched high and low for an answer. If I had a DIESEL answer then I would be able to implement it in AutoCADLT and also wouldn't matter that we use model tabs for our drawings. 

0 Likes
Message 4 of 9

alanjt_
Collaborator
Collaborator
Accepted solution

Seems like the first thing you should do is bring everyone into the 2000s and start using paperspace. 😛

 

With LT, there isn't going to be an automated solution. The only real option I can think of is creating an xref containing text with the total number of sheets (updated manually) and inserting it into each file. You could also do this with a text file and RTEXT (if that works in LT). These are clunky solutions, but the only viable option.

0 Likes
Message 5 of 9

scot-65
Advisor
Advisor
In what manner are you using the DIESEL?
A formula/field?
UI display (MODEMACRO or pull-down)?

Take Ranjit's LISP solution and inject it into
a USERI#. There are 5 available and DIESEL
can see these.

Of course there is the issue of initializing this.
If not inside S::STARTUP, a command reactor
might work.

???

Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

0 Likes
Message 6 of 9

alanjt_
Collaborator
Collaborator

@scot-65 wrote:
In what manner are you using the DIESEL?
A formula/field?
UI display (MODEMACRO or pull-down)?

Take Ranjit's LISP solution and inject it into
a USERI#. There are 5 available and DIESEL
can see these.

Of course there is the issue of initializing this.
If not inside S::STARTUP, a command reactor
might work.

???

LT means no access to LISP.

0 Likes
Message 7 of 9

steve_carson
Enthusiast
Enthusiast

If you name your drawing files consistently, you could always include the sheet number as a part of the file name and use diesel to pull out just those digits. For example the first three drawings might look like:

 

PXXXX-01-G001.dwg

PXXXX-02-G002.dwg

PXXXX-03-C001.dwg

 

Then you could just pull out the 7th and 8th characters of the filename. I don't use diesel often enough to tell you exactly how to pull out those digits, but I know it's possible. It's not the fully automated solution you are looking for, but it's an option.

0 Likes
Message 8 of 9

scot-65
Advisor
Advisor

From the AutoCAD 2009 Customization Guide:

 

 
Catalog of DIESEL Functions 
 
 
Status retrieval, computation, and display are performed
by DIESEL functions. All functions have a limit of 10
parameters, including the function name itself. If this
limit is exceeded, you get a DIESEL error message. Topics in this section + (addition) - (subtraction) * (multiplication) / (division) = (equal to) < (less than) > (greater than) != (not equal to) <= (less than or equal to) >= (greater than or equal to) and angtos edtime eq eval fix getenv getvar if index nth or rtos strlen substr upper xor

 

As you can see, DIESEL is quite limited in function.

 

(apologies as I did not see "LT" in your post).

 


Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

0 Likes
Message 9 of 9

paulmartin_
Contributor
Contributor

Hello all, 

 

Thank you for all your replies. I am using DIESEL in a field currently to display the sheet number since our electrical drawings have standard filenames. Obviously lisp is out of the question along with DIESEL's limited functionality. I knew the outcome of this question, but wanted to see if there was something I was missing. 

 

I believe I will explore sheet sets and begin to transition into layout/paper space to hopefully make drawing creation easier in the future. With electrical drawings and schematics it is more of a duplication rather than a creation, which is why I believe my company, which I am brand new to, has gotten away with using model space in the past. I am hopeful it won't take me long to get acquainted with sheet set manager to be able to easily create, customize and standardize drawings going forward. There are posts online that say creating good templates should be a starting point, but I would welcome any advice or web links in the way of making drawing packages and drawings easier in the future. Wish me luck and thanks again for all your assistance so far.

 

As a final side note, our drawings all need to end up in the same file location at the end and are relatively small sets with approximately 16 sheets if that makes a difference in how you guys suggest creating a sheet set.   

 

 

 

0 Likes