Is there a way to merge styles without using the Standards? Are there good lisp routines that will do this? I know this is an ancient question.
Solved! Go to Solution.
Solved by cadffm. Go to Solution.
I used to have one for merging text styles.
Sledgehammer approach to force all objects style to standard.
(defun c:foo (/ a d) ;; RJP » 2019-10-02 (vlax-for l (vla-get-layers (setq d (vla-get-activedocument (vlax-get-acad-object)))) (cond ((= -1 (vlax-get l 'lock)) (vlax-put l 'lock 0) (setq a (cons l a)))) ) (vlax-for b (vla-get-blocks d) (vlax-for o b (if (vlax-property-available-p o 'stylename) (vl-catch-all-apply 'vla-put-stylename (list o "Standard")) ) ) ) (foreach l a (vlax-put l 'lock -1)) (vla-regen d acallviewports) (princ) ) (vl-load-com)
I was directed to one on The Swamp. It seems to work but my dwg still needs cleaning. I'm trying to merge unwanted styles to a user style, not Standard. These unwanted styles are in use.
There are several LISP routines out there for merging styles. Which styles would you like to merge?
You can not purge styles in use, that incl. the current style because this style is in use...as the current style.
And there is one special thing, that normal BTN tools not handle:
Merging shouldn't be a problem (have you problems with merging, or just with clean/purging?
You can not clean/purge the first style in your drawing, normally it is the STANDARD style, but everyone is able
to rename style, also 'Standard'.
For example:
Standard is the first and Style1 a second one.
you can not purge the STANDARD style.
I rename 'Standard' to "AAA", rename 'Style1' to 'Standard',
now "AAA" is the first style and you can not this one (because it was and is the first style, just the name changed)
First style in your file is
Command: (cdr(assoc 2 (tblnext "STYLE" T)))
Sebastian
I'm trying to merge several styles into 1 user style, not Standard. It says these styles are in use but I haven't been able to find them. The only C3D styles in the dwg are standard. I found the attached lisp that almost merged all but there are a couple left.
Here is the dwg with almost everything erased. The styles are still there. The only Styles I'm concerned with are the Simplex-3 and Simplex-4, which I want to merge to Simplex.
Never ask for some strange things if the file contains corrupt data 😉
Open the file by RECOVER or just run AUDIT,
then try it again.
Simplex-3/4 are part of corrupt or lost tablestyle fragments.
AUDIT yes
Sebastian
I had already tried that several times and just did it again. I am not getting any error messages. Also tried -wblock for the entire dwg. I'm on C3D 2019. What version are you using? Is there a way to see the table fragments listed in the dwg?
Not possible to purge after
audit/yes
Purge All (incl.orphraned data)
Sorry i am away from PC now, and perhaps...
I will check it
later/tomorrow/tgis weekend/no later than Monday.
but i was able to purge both style.
Audit or recovet
Purge.. what i missed?
>" Is there a way to see the table fragments listed in the dwg?"
No.
Sebastian
Hi again.
Open the file by RECOVER
Use
Command -Purge all
or create a new layer for example
-la new 123
then use Purge dialog to purge all
Sebastian
Can't find what you're looking for? Ask the community or share your knowledge.