Author Topic: Idea to get lines  (Read 3175 times)

0 Members and 1 Guest are viewing this topic.

One Shot

  • Guest
Idea to get lines
« on: March 09, 2006, 09:41:27 PM »
With this lisp that I have any idea for is a bit more complicated for me.  So I am going to through this out there for the night and I will try to figure out how to start it.

What I would like to try to write is to get the top line that is stacked on to lines.  Lets say that that you have a lines that were flattened.  And you would like to take the top layer of lines and move them or copy them.  This way that you will have only one line to work with.

I will be back in the morning with more input.

Thank you,

Brad

Slim©

  • Needs a day job
  • Posts: 6566
  • The Dude Abides...
Re: Idea to get lines
« Reply #1 on: March 09, 2006, 10:19:48 PM »
Are all of these lines on the same layer?
I drink beer and I know things....

One Shot

  • Guest
Re: Idea to get lines
« Reply #2 on: March 09, 2006, 10:24:09 PM »
Are all of these lines on the same layer?

Yes!  The are on the same layer.

Slim©

  • Needs a day job
  • Posts: 6566
  • The Dude Abides...
Re: Idea to get lines
« Reply #3 on: March 09, 2006, 10:48:54 PM »
Do you need to keep them all? If not try the "Express Tools" OVERKILL routine. It will delete duplicates. Or the www.dotsoft.com "ToolPac" DELETE DUPLICATE OBJECTS routine. Or someone here may have a LISP or VBA progy that will remove duplicate objects. I think I've got one somewhere. I'll look.
I drink beer and I know things....

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Idea to get lines
« Reply #4 on: March 09, 2006, 10:51:55 PM »
If they share coordinates what constitutes being on top? Creation order? If so you could sort by objectid's (guess) or normalized handles (padded with leading zeros so all sport the same string length). Also nentselp may be another avenue.

If I misunderstood your requirement forgive me, it's my bed time and I only have three brain cells holding hands.

Edit: Of course there's always the z coordinates, duh.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Slim©

  • Needs a day job
  • Posts: 6566
  • The Dude Abides...
Re: Idea to get lines
« Reply #5 on: March 09, 2006, 10:58:09 PM »
I only have three brain cells holding hands.

Three I only have two......   :?
I drink beer and I know things....

One Shot

  • Guest
Re: Idea to get lines
« Reply #6 on: March 10, 2006, 08:49:57 AM »
If they share coordinates what constitutes being on top? Creation order? If so you could sort by objectid's (guess) or normalized handles (padded with leading zeros so all sport the same string length). Also nentselp may be another avenue.

If I misunderstood your requirement forgive me, it's my bed time and I only have three brain cells holding hands.

Edit: Of course there's always the z coordinates, duh.

I don't want to use overkill for this.  This lisp will be used on lecagy and new drawings that I do not want to alter in any way.
Here are the steps!  I just want to get items that are in those drawings that I need to complete another or to add to me block library.

Step 1:
Identify the lines that are stack on top of each other.  This could done by window or input all.

Step 2:
Select all the top layer of lines

Step 3:
Convert the lines to layer 0 and keep the colors of the lines.

Step 4:
Create it into a block. 

Step 5:
Pick insertion point.

Step 6:
Purge the block and set the block to 0,0,0

Step 7:
Give the blocks a name like Block 1, Block 2 etc..with the date they were exported to a folder named (Top Layer Line Blocks)

Step 8:The loacation would be (C:\Documents and Settings\bcrouse\Desktop\Library R & D Blocks\R and D Blocks\Top Layer Line Blocks)

Step 9:
End function.

Like I said at the beginning of this thread that this is a bit more complicated for me.  I would love it if someone can work with me to get the lisp created.

Thank you,

Brad

















CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Idea to get lines
« Reply #7 on: March 10, 2006, 10:23:24 AM »
Brad,
I don't understand what is your goal here.
If the lines have the same end points & same z they are redundant & in my opinion should be removed.
They are not stacked, they occupy the same space.
The only "stacking" would be the display order and the creation order as Michael pointed out.
If you don't want to alter the drawing then make a copy of it.
Why would you want to save these redundant line anyway?

If you are wanting a copy of a group of objects to create a block or separate drawing I would think
that you would want to eliminate duplicate lines not collect them.

I suspect you have a drawing with, lets say, windows that were blocks at one time & were exploded.
And there are more than one occupying the same space. You want to copy the window to a new drawing
so that you can use it in a future drawing & as such you want it on layer 0 and a specific color.
That's my guess and "Windows" is just an example not the mystery object you are dealing with.

I don't mean to be critical here but most of your request follow this pattern. You don't give enough
information to ascertain the scope of the problem you are trying to solve and it results in many post
by others trying to get the information from you. You can help yourself & others by providing as much
information as you can about your request.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Bob Wahr

  • Guest
Re: Idea to get lines
« Reply #8 on: March 10, 2006, 10:47:36 AM »
open the drawing, run overkill, grab what you want ^C, close the drawing without saving (now the old drawing has not been altered), go to new drawing, paste the stuff in, lather, rinse, repeat as necessary.