PDA

View Full Version : Can I cause an alert message if a font exists in a dwg?


pmedina
2008-11-19, 04:32 PM
I there an easy way using LISP in my acaddoc.lsp that I can search every drawing that is opened for a specific font and then cause an alert message to show up?.

Specifically I need to search for a font called "Simplex2" irreguardless of the text style name used in the drawing.

Background: The font Simplex2 is causing certain problems when we create a PDF using 3rd party software. We need to alert our users when it exists in a drawing so they can take the appropriate corrective action.

Thanks

tedg
2008-11-19, 05:05 PM
I there an easy way using LISP in my acaddoc.lsp that I can search every drawing that is opened for a specific font and then cause an alert message to show up?.

Specifically I need to search for a font called "Simplex2" irreguardless of the text style name used in the drawing.

Background: The font Simplex2 is causing certain problems when we create a PDF using 3rd party software. We need to alert our users when it exists in a drawing so they can take the appropriate corrective action.

Thanks
Why don't you just eliminate the font from everyone's machine and set "fontalt" to something you do want? You say it's causing everyone issues, delete it.

Fonts don't reside in the drawings, they reference fonts in the program editing them.

Ed Jobe
2008-11-19, 05:24 PM
Why don't you just eliminate the font from everyone's machine and set "fontalt" to something you do want? You say it's causing everyone issues, delete it.

Fonts don't reside in the drawings, they reference fonts in the program editing them.
If this is not what you want and you still need the font for other reasosns, you can use the lisp to take the corrective action for the user rather than just alerting them. So the first thing you need to do is write down a recipe, what steps do you want to perform?

Also, I moved this thread to the lisp forum. The customization forum is for menus, etc.

kennet.sjoberg
2008-11-20, 12:51 AM
you can add this lines. . .

(if (tblsearch "STYLE" "Simplex2 " )
(alert "Style Simplex2 is present in drawing ! " )
( )
)


: ) Happy Computing !

kennet

RobertB
2008-11-20, 06:38 AM
you can add this lines. . .

(if (tblsearch "STYLE" "Simplex2 " )
(alert "Style Simplex2 is present in drawing ! " )
( )
)
Please don't forget about styles not named that using the font, and, even worse, MText objects with font overrides.

pmedina
2008-11-20, 06:48 PM
Thanks for the input so far. I am a weak lisp writer. I will also look into the "fontalt" options.