Jump to content

Help - Select duplicate entities


teknomatika

Recommended Posts

Hence the statement

"Problem I can see with that is, which one the two will be moved to "Duplicates" layer?"

 

It is better to be in the lower-order entities.

 

Change:

(setq objs (ssget "_X" '((0 . "~VIEWPORT") (0 . "~INSERT"))))

to:

(setq objs (ssget ":L" '((0 . "~VIEWPORT") (0 . "~INSERT"))))

 

Resolved.

 

How'd you propose to go about doing that?

We could include a prompt to select an entity for layer information and retain enitities on that layer. and the rest would be moved to a new layer with the its original name with a suffix of _D?

 

Would that work for you?

 

For my case it is preferable that the entities considered duplicates (or common) detected in the lower order of overlapping entities, are sent to its own layer. The suggestion of layers with the suffix D is interesting.

In short, the most important thing is that made ​​the detection and differentiation of the entities considered duplicates, so it will be possible to manipulate independently.

Link to comment
Share on other sites

  • Replies 72
  • Created
  • Last Reply

Top Posters In This Topic

  • teknomatika

    28

  • pBe

    18

  • ReMark

    10

  • David Bethel

    8

Top Posters In This Topic

Posted Images

pBe,

Thank you. I'm waiting.

However, I continue to try the latest version of the routine but I find several inconsistencies. I see that some entities that are not duplicates are detected as such and sent to the respective layer. Also, sometimes duplicate entities are directed to the respective layer but does not assume the color set for the same.

Certainly these are problems to be solved.

Link to comment
Share on other sites

I noticed that too :lol:

 

Post Updated:

 

Check the previous posted code

 

Also, sometimes duplicate entities are directed to the respective layer but does not assume the color set for the same.

 

EDIT: You want to keep the oriignal color for the duplicates? If the color properteis of the duplicate entities are BYLAYER it would follow the new layers color property, in which case is easy to include that feature in the code, but if not bylayer it will retain its color.

Edited by pBe
Link to comment
Share on other sites

pBe,

Any color. is indifferent.

 

However I tried the new version of the routine. It seems to be better. But still some inconsistencies.

I attach an image to better understand.

 

The result after running the routine is not consistent: Sometimes doing the work properly and sometimes not. Strange.

 

duplicates_example_2.jpg

Link to comment
Share on other sites

pBe,

However I tried the new version of the routine. It seems to be better. But still some inconsistencies.

 

I suspect the inner square are different entities.. one is PLINE the other are lines or the other three are not exact geometrically the same

Link to comment
Share on other sites

No. If no polylines. The polylines of the rectangles were previously exploded.

In most cases the routine performs the task well. It's almost perfect.

Link to comment
Share on other sites

No. If no polylines. The polylines of the rectangles were previously exploded.

In most cases the routine performs the task well. It's almost perfect.

 

Strange indeed :?

Anyhoo. what do you want to do with the colors?

 

POST UPDATED: includes color retention for new duplicate layer

Edited by pBe
Link to comment
Share on other sites

Strange indeed

Anyhoo. what do you want to do with the colors?

 

POST UPDATED: includes color retention for new duplicate layer

 

The retention of colors for duplicate entities is nice.

The routine is best but there is still the same inconsistencies previously reported.

My version of Autocad is 2009. The problem may result from it?

Link to comment
Share on other sites

It really begs the question...How does one end up with so many duplicate entities that a lisp routine is needed to cull them out then transfer them to another layer? What's the purpose of putting them on another layer instead of deleting them?

Link to comment
Share on other sites

It really begs the question...How does one end up with so many duplicate entities that a lisp routine is needed to cull them out then transfer them to another layer? What's the purpose of putting them on another layer instead of deleting them?

 

ReMark,

In my work, when the building project is subject to change, for the purpose of the licensing department works, you must present the drawings of the building with a certain graphic description: The unchanged elements are represented in white (black). to demolish the elements are represented in yellow and the new elements will be represented in red.

With this routine, I intend to simplify the process of comparing the existing situation and the situation changed. In the drawings overlapping entities correspond to duplicate existing elements unchanged.

Link to comment
Share on other sites

Couldn't you just copy to a new layer the objects that you needed to retain and then turn that layer on/off in your viewport to get the affect you are looking for?

Link to comment
Share on other sites

So you are already using different layers with different colors to begin with.

 

Wouldn't areas to be demolished be cross-hatch in some manner?

 

Are you familiar with Format > Layer Tools > Copy objects to new layers command?

 

What about using lineweight to distinguish between existing and proposed structures?

Link to comment
Share on other sites

Couldn't you just copy to a new layer the objects that you needed to retain and then turn that layer on/off in your viewport to get the affect you are looking for?

ReMark,

My problem is not so much in the preview. This type of work has to be printed. For this to result in the plotter I have to have three different situations in three different colors.

As I have been explaining, the routine only will allow to be detected and isolated entities considered duplicates or common so that a second phase of work to assemble the three separate components.

Link to comment
Share on other sites

So you are already using different layers with different colors to begin with.

 

Wouldn't areas to be demolished be cross-hatch in some manner?

 

Are you familiar with Format > Layer Tools > Copy objects to new layers command?

 

What about using lineweight to distinguish between existing and proposed structures?

 

Yes, I know this tool and these options. This is the procedure I use. However, for complex designs that will not work because it results in a time consuming task.

With the routine the whole process is automated and therefore much faster.

Link to comment
Share on other sites

So far the procedure is not functioning as well as I can tell. You're still working out the glitches right?

 

So you have an existing building. Some walls/structures must be demolished. Some walls/structures have to be added. Three layers: Existing, Demo work, New Additions. Each can be controlled in a viewport by freezing/thawing. Seems simple enough.

Link to comment
Share on other sites

So far the procedure is not functioning as well as I can tell. You're still working out the glitches right?

 

So you have an existing building. Some walls/structures must be demolished. Some walls/structures have to be added. Three layers: Existing, Demo work, New Additions. Each can be controlled in a viewport by freezing/thawing. Seems simple enough.

 

I understand your conclusion, but it's not that I want.

What I want is that from the final version of the design I overwrite the original version, and the common elements (elements to keep) are detected and isolated automatically by the routine. That way I can easily isolate and assemble three different components (white, red and yellow).

 

In fact, the routine I want, that will do exactly the same as the Autocad tool "overkill" but instead of duplicate entities are deleted, must be stored in its own layer.

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