Jump to content

Getting all elements layers present in model space and extracting properties into a csv file or spreadsheet.


CADpp

Recommended Posts

Hello. Is it possible to write a lisp routine that could get all elements in model space, take whatever layers they are on, and extract all the layer properties into a spreadsheet?

 

I have attached a sample cad file replicated to what I need to do. so basically, we get a raw cad file which some of the elements are being controlled by the colors. Now, I need to put the elements according to the following layer naming convention:

Layer Cyan >> TL-1

Layer E >> TL-2

Layer Green >> TL-3

Layer RedStuff >> TL-4

Layer GROUND >> TL-5

Layer Yellow >> TL-6

But my problem is some other elements are on the same layer but different in color which is supposed to be put on a different layer such as:
Color magenta >> TL-7

color blue >> TL-8

color whit >> TL-9

 

I only thought maybe I could just get all the elements properties and sort it out using excel sheet and manually do a simple script to change their layers and stuffs once I already know the specific colors to get that is present in my model space. quick select is a good option to do it but I got a bunch of drawings and bunch of elements in one drawing and it's so tedious to do it manually like that. I am open to any other easier suggestions if there's any and thank you in advance for any help.

 

image.thumb.png.094193942ec05cc68bb9d4c048aef8be.png

Drawing1.dwg

Link to comment
Share on other sites

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