Jump to content

Closed polyline Area values to Excel


Butch

Recommended Posts

Hey Fixo you have done a big thing for me.

thanks for that. Is it further possible that only one excel file be created for one particular dwg & when some more closed plines are selected, their areas appear in the same excel files. Sorry to trouble you again.

 

This program does already open or create (if this does not exist)

one Excel file per drawing in the working folder

Sorry I don't understand your task because of my

poor English level

 

~'J'~

Link to comment
Share on other sites

  • Replies 42
  • Created
  • Last Reply

Top Posters In This Topic

  • fixo

    14

  • Butch

    7

  • viviancarvalho

    5

  • xxfaxx

    2

Top Posters In This Topic

Posted Images

Dear Fixo

What i mean to say is that when an excel file is created for one particular Cad file, the data should be added to the same excel file when the program is run more than once. Another excel file should not be created when working with the same Cad file.

Link to comment
Share on other sites

Dear Fixo

What i mean to say is that when an excel file is created for one particular Cad file, the data should be added to the same excel file when the program is run more than once. Another excel file should not be created when working with the same Cad file.

 

Did you tryed the last program?

It will do all what you need: create the new file if this

does not exist or open an existing file

It will be find the last cell if the Excel file was created

and append data after the last row there

If the Excel file is new in this case it will be

write the data starting from the first row

There is just one thing though: the program

can write duplicate records if you will be select

the same room in the different Acad session twice

Hope this make a sense

 

~'J'~

Link to comment
Share on other sites

I added a few lines of code

Check it again

 

~'J'~

 

Hey Fixo!

Its working fine :-)

Its a bit slower then first few solutions,couse you must pick every polyline, but its ok.

One thing maybe only, can you do that values always get add in the same excel file?

Eg. you activate command pick polylines and exoit command. Excel opens and it shows a column of areas. Then you select a cell that will define a new column start in excel for new values to be copied.

What do you think?

Link to comment
Share on other sites

Hey Fixo!

Its working fine :-)

Its a bit slower then first few solutions,couse you must pick every polyline, but its ok.

One thing maybe only, can you do that values always get add in the same excel file?

Eg. you activate command pick polylines and exoit command. Excel opens and it shows a column of areas. Then you select a cell that will define a new column start in excel for new values to be copied.

What do you think?

 

Grab the code block from post#19

there is what you exactly need (I mean to

write or append data into the same Excel file)

 

~'J'~

Link to comment
Share on other sites

  • 2 years later...
  • 1 month later...
Here is the final version I hope :)

 

~'J'~

 

Hello dear fixo, I'm sorry but I can't get it to work. When the routine starts, it asks for the room number and then to select the polyline. After selecting the polyline an error message appears "Close Excells File Only" and a blank Excel Sheet pops up on the screen.. Should I configure the file path or something? What is the problem with this error?

 

Thanks

Link to comment
Share on other sites

  • 3 months later...

Fixo,

I know this thread is old but I just stumbled on it. Your V5 routine is brilliant. However, I have been trying to add 2 extra columns, but to no avail. I'm not efficient enough to decipher your logic and variables. Your help would be appreciated.

 

From the same selection I require the overall width and overall length (of polyline bounding box). Not actual lengths as the polylines are often of irregular shape.

ie

(setq ss (ssget "+.:S:E" (list (cons 0 "LWPOLYLINE")(cons 70 1))))
(setq en (ssname ss 0) obj (vlax-ename->vla-object en))
(setq LL (vlax-safearray->list minpt) UR (vlax-safearray->list maxpt))
(setq #WDT (- (car UR)(car LL)))(setq #HGT (- (cadr UR)(cadr LL)))
(prompt "\nOverall Width = ")(princ #WDT)
(prompt "\tOverall Height = ")(princ #HGT)(terpri)

 

eg Result from selected POLYLINES for Excel sheet (4 Columns) These are for panels not rooms so I can simply change your 'label' prefix.

 

Required Excel Export:

PANEL WIDTH HEIGHT AREA

 

I have attached a 'real world' example dwg to help clarify. Many thanks in advance, if you or someone else can help.

excel_test.zip

Link to comment
Share on other sites

  • 3 weeks later...

very nice i'll try that . Fixo, will that apply to polygons(as cobwebs for example) made of lines instead of polylines? I need this one.thanks

Link to comment
Share on other sites

  • 1 month later...

tks alot mr fixo

this lisp is very very useful and really excellent but please there are one small problem when we select the the area one by one it was very good but when select all it at one time >>>

 

excel arrange it ascending or by the first area was draw i dont know >>>>please if you can solve this problem it was very good lisp

tks alot

Link to comment
Share on other sites

  • 2 years later...

Hello sir I need this lisp

in only one change take polyline area in rhombos and shape of polyline

Link to comment
Share on other sites

  • 3 months later...
  • 2 months later...

Its amazing what you find! I was wondering how hard would it be to add an export of the elevation of polyline with the area? I am having a hard time trying to figure this out! lol. Scratching my head!

Link to comment
Share on other sites

  • 2 years later...

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