|
|
#1 |
|
Full Member
![]() ![]() Using: AutoCAD 2009 Join Date: Aug 2009
Posts: 44
|
I'm looking for code that runs data extraction to predetermined selections without all of the prompting windows.
The procedure would be as follows: 1. prompt user for selection of objects 2. run data extraction for just the lines getting the info of count, name, layer, length 3. save as an xls file only (no table in drawing) named "takeoff" in the current folder of course I'm new to lisp and am experimenting with the action recorder. What I am trying to get past in all applications are pauses in macros or lisp files due to prompting windows in the commands when I already know what these selections are to be. Any insight or advice would be greatly appreciated. |
|
|
|
|
|
#2 |
|
Senior Member
![]() ![]() ![]() Using: AutoCAD 2010 Join Date: Mar 2009
Location: Brisbane, Australia
Posts: 250
|
If you are learning lisp the action recorder won't by much help.
Why don't you post your attempts and we can help you... |
|
|
|
|
|
|
|
|
#3 |
|
Super Member
![]() ![]() ![]() ![]() Using: Civil 3D 2009 Join Date: Apr 2008
Posts: 1,488
|
So, you are wanting to create a selection set (ssget I assume), then iterate through the selection, sorting by layer and exporting to an .xls document the layer name, quantity, length, etc. Is this correct?
The vlax-curve functions can give you a lot of your total lengths information. Quantity is easy, you just separate out objects by layer and get a length. As Steve said, post your attempts and we can make something work. |
|
Seann: ...it went crazy ex-girlfriend on me...
eric_monceaux...its pretty funny seeing two AutoCAD Gods give each other flak... |
|
|
|
|
|
|
#4 |
|
Senior Member
![]() ![]() ![]() Using: AutoCAD 2010 Join Date: Mar 2009
Location: Brisbane, Australia
Posts: 250
|
And quickly before Alan gets bored and writes it all.
![]() |
|
|
|
|
|
|
|
|
#5 |
|
Super Member
![]() ![]() ![]() ![]() Using: Civil 3D 2009 Join Date: Apr 2008
Posts: 1,488
|
|
|
Seann: ...it went crazy ex-girlfriend on me...
eric_monceaux...its pretty funny seeing two AutoCAD Gods give each other flak... |
|
|
|
|
|
|
#6 |
|
Senior Member
![]() ![]() ![]() Using: AutoCAD 2010 Join Date: Mar 2009
Location: Brisbane, Australia
Posts: 250
|
|
|
|
|
|
|
|
|
|
#7 |
|
Super Member
![]() ![]() ![]() ![]() Using: Civil 3D 2009 Join Date: Apr 2008
Posts: 1,488
|
|
|
Seann: ...it went crazy ex-girlfriend on me...
eric_monceaux...its pretty funny seeing two AutoCAD Gods give each other flak... |
|
|
|
|
|
|
#8 |
|
Full Member
![]() ![]() Using: AutoCAD 2009 Join Date: Aug 2009
Posts: 44
|
What I am doing is making a 2d roof plan (above view) of lines all in one layer (0). Then I assign new layers to all of the lines using names such as "eave", "ridge", "hip", etc. This I have covered.
After assigning all the new layer names, I run the dx command: data extraction. Which is an 8 page window of prompts: 1-Q: Choice of to use a previous dxe template or start a new one A: Start a new one save as "takeoff" in default file location 2-Q: Drawings Sheet source A: Select Objects 3-Q: Objects A: Line (only) 4-Q ropertiesA: Layer & Length Only 5-Q: Refine Data A: No change, next, 6-Q:Choose Output A: Output to external File "takeoff.xls" in file location 7-(skipped because "table insertion" in 6 wasn't chosen") 8- Finish What I want to accomplish (with the same result) is running a command (lets call it "takeoff") and it only prompt the following: 2-"Select Objects" User select objects, enter. 6-"save as:" User saves xls file in proper location. and your done without all of the other promptings. This is for coworkers who are not normal cad users. I think I may have taken on something I can't accomplish as easily as I thought. |
|
"What if there is no tomorrow? There wasn't one today!"
|
|
|
|
|
|
|
#9 |
|
Senior Member
![]() ![]() ![]() Using: AutoCAD 2010 Join Date: Mar 2009
Location: Brisbane, Australia
Posts: 250
|
Whoa I didn't even know of that command.
![]() Anyways, are you trying to learn lisp or are you just wanting someone to write it? I only ask because it's probably be a good program to learn from. You'd start with an ssget function which selects objects. If you are just wanting lines it'd be: Code:
(setq ss (ssget '((0 . "LINE")))) |
|
|
|
|
|
|
|
|
#10 |
|
Full Member
![]() ![]() Using: AutoCAD 2009 Join Date: Aug 2009
Posts: 44
|
Thank you for your interest.
I guess my answer is both. If someone would like to write it, that would be great. I am learning lisp on my own now and I am just getting to the command stage. I don't have a lot of time or I'd have learned it by now. I know that you set ss to a variable. Is ssget of all the lines selected? Do you know if lisp could run the dx command for you with only 2 of the prompts as I stated before? Would this possibly be a VBA problem? You know the funny thing is I discovered dx when I miss typed dc trying to open up design center or I would never have known about it either! P.S. I have no idea how that emocon ended up in my post on #4! lol |
|
"What if there is no tomorrow? There wasn't one today!"
|
|
|
|
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Attribute Data Extraction Writing to External Excel File | spur | AutoCAD General | 0 | 1st Nov 2009 08:02 pm |
| Data Extraction | RyanAtNelco | AutoCAD Drawing Management & Output | 4 | 31st May 2009 08:16 am |
| Attribute data extraction/lisp/other... | Caddy79 | AutoCAD Drawing Management & Output | 2 | 28th Apr 2009 09:30 pm |
| HELP.... Autocad 2009 Data Extraction | JBullseye74 | AutoCAD Drawing Management & Output | 8 | 23rd Feb 2009 07:40 pm |
| Spline data extraction using lisp | beproj | AutoCAD General | 3 | 27th Mar 2006 04:48 am |