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

Delete a text style not in use

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
drock
2960 Views, 8 Replies

Delete a text style not in use

Hello,

 

I cannot purge a textstyle out of my drawing. When I run purge nothing is available.

 

However if I select the style from the style dialog I am able to select delete and delete the style.

 

When I use the method on the style (vlax-invoke-method style 'Delete). AutoCAD states:

Automation Error. Object is referenced by other object(s)

 

The style is defenatly not in use but may have been used in the past.

 

Any ideas

Thanks

David

 

 

8 REPLIES 8
Message 2 of 9
pbejse
in reply to: drock

Somehow i can't duplicate that condition. Deleting the TextStyle via Style dialog box and thru vla produce the same result. The only time i wasnt able to delete the  Text style is when it's currently is use thru the following:

 

Dimstyle

Part of a block

When set as Current

 

How's about posting that file in here so we can have a look/see

 

 

Message 3 of 9
drock
in reply to: pbejse

Hello,

 

My apologies, it turns out I cannot delete the font with the delete option in the styles until I delete the table on the attached drawing.

 

I am trying to remove the font ISOCP.

 

There seems to be something stuck in the table, there is nothing in the table style, no cell override or anything. However if I delete or explode the table I am then able to delete the style.

 

I'd really like to find out why as not being able to delete or purge the font means that my script to change fonts keeps running unnecessarily on this drawing.

 

Kind Regards

David

 

 

 

Message 4 of 9
pendean
in reply to: drock
Message 5 of 9
drock
in reply to: drock

Thanks very much, nice program, unfortunately it didn't fix the style. It is stuck inside the table. But it seems no amount of persuading releases the style.

 

David

Message 6 of 9
_Tharwat
in reply to: drock

Something related to table with that style , because if you erase the table you can delete the Text Style with

this simple code .

 

(vlax-for style (vla-get-textstyles (vla-get-ActiveDocument (vlax-get-acad-object)))
  (if (eq (vla-get-name style) "ISOCP")
    (vl-catch-all-apply 'vla-delete (list style))
  )
)
Message 7 of 9
dbroad
in reply to: drock

Drock,

Thanks for posting the problem so well.  It is quite possible that you found a bug worth reporting at autodesk.com/submitbug.

 

To fix the problem in this case, select all the cells in the table and then select the text style "standard".  Then  purge the style and then reselect the table and return the cell text styles to what you want.  This should not be necessary since I looked at every cell in your table and there were no references to the style you want to purge.  But it works in this case and probably in the drawing where there is actually something worth saving.

Architect, Registered NC, VA, SC, & GA.
Message 8 of 9
AlessiMarc'Antonio
in reply to: drock

With properties change the text style of table cells to Standard (select the cells), then change to Arialn again.

 

Marc'Antonio Alessi

http://alessi.xoom.it//alessi/Programmi.htm
(vl-string-translate "1234567890" "ie@mst.lan" "499825513610716")
2D Parametric for 2000-2013
Message 9 of 9
drock
in reply to: AlessiMarc'Antonio

Thanks everyone, yes it appears to be a bit of a bug, but with your helpful solutions I am able to now purge the redundant style.

 

Kind Regards

David

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

Post to forums  

Autodesk Design & Make Report

”Boost