Message 1 of 5
Fix routine - Multiply owned object
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, I have wrote the simple routine for quick layer creation.
Spoiler
(defun C:QL ( / :CopyLayer new old)
(defun :CopyLayer (new old / ed )
(if (setq ed (entget (tblobjname "LAYER" old)))
(entmakex (subst (cons 2 new)
(assoc 2 ed)
ed))))
(setq old (if (setq ssl (ssget "_I"))
(cdr (assoc 8 (entget (ssname ssl 0))))
(getvar 'CLAYER))
new "")
(while (or (not (snvalid new 0))
(tblsearch "LAYER" new))
(setq new (lisped old)))
(if (:CopyLayer new old)
(setvar 'CLAYER new))
(sssetfirst nil nil)
(princ)
)
The routine does what I wanted to. But it looks that its causing same serious issues in the drawing - Multiply owned object. I really tried to find the problem... but I am missing something fundamental. It causes the same problem with both entmake and entmakex.
Here is the log from AUDIT command.
Spoiler
Command: AUDIT
Fix any errors detected? [Yes/No] <N>:
Auditing Header
Auditing Tables
Auditing Entities Pass 1
Pass 1 12200 objects audited
Auditing Entities Pass 2
Pass 2 12200 objects auditedAcDbLayerTableRecord: "v_infr_n_DS++"
Extension dictionary 149D3B Not this object Set to this
AcDbLayerTableRecord: "v_infr_n_DS++"
was not repaired.
Auditing Blocks
38 Blocks audited
Total errors found 1 fixed 0
Erased 0 objects
Thanks in adnvance.
|