teknomatika Posted September 6, 2011 Author Posted September 6, 2011 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. Quote
teknomatika Posted September 6, 2011 Author Posted September 6, 2011 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. Quote
pBe Posted September 6, 2011 Posted September 6, 2011 (edited) I noticed that too 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 September 6, 2011 by pBe Quote
teknomatika Posted September 6, 2011 Author Posted September 6, 2011 pBe, I prefer to be assigned a different color. Tanks. Quote
pBe Posted September 6, 2011 Posted September 6, 2011 pBe,I prefer to be assigned a different color. Tanks. What color might that be? Did you try the modified code? Quote
teknomatika Posted September 6, 2011 Author Posted September 6, 2011 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. Quote
pBe Posted September 6, 2011 Posted September 6, 2011 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 Quote
teknomatika Posted September 6, 2011 Author Posted September 6, 2011 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. Quote
pBe Posted September 6, 2011 Posted September 6, 2011 (edited) 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 September 6, 2011 by pBe Quote
teknomatika Posted September 6, 2011 Author Posted September 6, 2011 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? Quote
ReMark Posted September 6, 2011 Posted September 6, 2011 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? Quote
teknomatika Posted September 6, 2011 Author Posted September 6, 2011 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. Quote
ReMark Posted September 6, 2011 Posted September 6, 2011 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? Quote
teknomatika Posted September 6, 2011 Author Posted September 6, 2011 ReMark, an example with an image: (the yellow is a little pale). Quote
ReMark Posted September 6, 2011 Posted September 6, 2011 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? Quote
teknomatika Posted September 6, 2011 Author Posted September 6, 2011 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. Quote
teknomatika Posted September 6, 2011 Author Posted September 6, 2011 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. Quote
ReMark Posted September 6, 2011 Posted September 6, 2011 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. Quote
teknomatika Posted September 6, 2011 Author Posted September 6, 2011 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. Quote
Recommended Posts
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.