Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Delete text style with "" a blank name

9 REPLIES 9
Reply
Message 1 of 10
thatcadguy
1083 Views, 9 Replies

Delete text style with "" a blank name

I have a couple problem drawings that are referencing a shx we don't have...and it turns out that the problem text style that's referencing it has "" for a name. Naturally, it doesn't show up in the style dialog. I've used tblobjname to find the table entity and tried to change the name, tried to delete it, no dice. Tried using the vla functions to delete it or rename it, also no dice. Out of ideas here. Has anyone encountered this before?

((0 . "STYLE") (2 . "") (70 . 1) (40 . 0.0) (41 . 1.0) (50 . 0.0) (71 . 0) (42 . 2.4) (3 . "EMHT.shx") (4 . ""))
9 REPLIES 9
Message 2 of 10
Kent1Cooper
in reply to: thatcadguy

I haven't encountered anything like that, but one thing you didn't mention trying is the ordinary Rename command. See whether this works to give you something you can purge:

(command "_.rename" "_style" "" "whatever")

or try the equivalent with hyphenated [so it doesn't give you the dialog box] -Rename typed on the Command: line. [Or, it's just possible that it would show up in the Rename dialog box as a blank line, which you would probably need to pick on to know it's there.]

As an aside, I'm curious to know how you were able to pin down the "" Style name in the first place....

--
Kent Cooper


thatcadguy wrote...
....the problem text style that's referencing it has "" for a name. Naturally, it doesn't show up in the style dialog. I've used tblobjname to find the table entity and tried to change the name, tried to delete it, no dice. Tried using the vla functions to delete it or rename it, also no dice. ....
Kent Cooper, AIA
Message 3 of 10
thatcadguy
in reply to: thatcadguy

In my search for what was referencing EMHT.shx, I dumped all the styles (and linetypes) using tblnext. That revealed this:
((0 . "STYLE") (2 . "") (70 . 1) (40 . 0.0) (41 . 1.0) (50 . 0.0) (71 . 0) (42 . 2.4) (3 . "EMHT.shx") (4 . ""))
at the end of the styles.

Command: -rename
Enter object type to rename
[Block/Dimstyle/LAyer/LType/Material/Style/Tablestyle/Ucs/VIew/VPort]: s
Enter old text style name: ""
Invalid text style name.

:(
Message 4 of 10
thatcadguy
in reply to: thatcadguy

In my search for what was referencing EMHT.shx, I dumped all the styles (and linetypes) using tblnext. That revealed this:
((0 . "STYLE") (2 . "") (70 . 1) (40 . 0.0) (41 . 1.0) (50 . 0.0) (71 . 0) (42 . 2.4) (3 . "EMHT.shx") (4 . ""))
at the end of the styles.

Command: -rename
Enter object type to rename
[Block/Dimstyle/LAyer/LType/Material/Style/Tablestyle/Ucs/VIew/VPort]: s
Enter old text style name: ""
Invalid text style name.

:(
Message 5 of 10
Anonymous
in reply to: thatcadguy

Does using Audit and/or Recover fix the problem?

Can you post a sample file?


wrote in message news:6328682@discussion.autodesk.com...
> I have a couple problem drawings that are referencing a shx
> we don't have...and it turns out that the problem text style that's
> referencing it has "" for a name.
Message 6 of 10
thatcadguy
in reply to: thatcadguy

No and no, it's an external reference that technically belongs to a customer.
Message 7 of 10
Anonymous
in reply to: thatcadguy

So, delete all the content. All I want to look at is the styles.

wrote in message news:6330643@discussion.autodesk.com...
> it's an external reference that technically belongs to a customer.
Message 8 of 10
thatcadguy
in reply to: thatcadguy

Have at it.

It's the very last style in the table.
Message 9 of 10
Anonymous
in reply to: thatcadguy

This code seems to get rid of it. After the shape file is purged
the null textstyle entry simply disappears from the database.
Shrug. I'm using vanilla 2010. This at least demonstrates what
needs to be removed/changed.

{code}

(defun c:fixit ()
(setq *acad* (vlax-get-acad-object))
(setq *doc* (vla-get-activedocument *acad*))

(vla-put-linetype
(vla-item (vla-get-layers *doc*) "EU-STM")
"Continuous"
)

(vlax-for item (vla-item (vla-get-blocks *doc*) "A$C3CC0711A")
(if (wcmatch (vla-get-linetype item) "EU-STM-ARW-*")
(vla-put-linetype item "Bylayer")) )

(vlax-for item (vla-get-linetypes *doc*)
(if (wcmatch (vla-get-name item) "EU-STM-ARW-*")
(vla-delete item)))

; for some reason this line did not work.
;(command "purge" "shapes" "EMHT.shx" "n")

(command "purge" "shapes" "*" "n")
)

{code}

wrote in message news:6330702@discussion.autodesk.com...
Have at it.
Message 10 of 10
devitg
in reply to: thatcadguy

It can not be PURGE , or even VLA-DELETE, because the   Object is referenced by other object(s).

 

"" denotes a BIGFONT not found.

 

I dig on blocks , dimstyle, but I can not find where it is referenced from. 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost