PDA

View Full Version : Solved: AutoCAD 2004 - SHX Fonts and an error



malik641
05-26-2006, 06:53 AM
I made a new template for my company and now every time I create MTEXT or edit MTEXT I get an error about too many unknown fonts in the object.

I've read this
http://usa.autodesk.com/adsk/servlet/ps/item?siteID=123112&id=2877326&linkID=2475323

but it's not too much help...it doesn't give me a direct solution as to what to do in order to have this not to happen.

Is there a way in VBA to search for the unknown fonts (non-TTF) so I can change them to a True Type Font and purge the unkown fonts...this is really annoying to work with.

Any ideas will help :thumb Appreciate it!

lucas
05-26-2006, 07:13 AM
Hi Pete,
does it give you a list of the unknown fonts or tell you which style. You can go to format-text style and change fonts associated with a style...

malik641
05-26-2006, 08:35 AM
Who's Pete??

Anyway, thanks George for the reply :rotlaugh:

No it doesn't give me a specific font style or anything...just "This object contains too many unknown font styles..."

I would like to obtain a list of these fonts though...

lucas
05-26-2006, 08:42 AM
Sorry Joseph, had a slight brain***
you might make a backup copy of the file and wblock the whole file to get rid of the references.

malik641
05-26-2006, 12:13 PM
...that's ok, my mind is getting fried from this problem I have.

I'll see what the wblock will do for me.

Thanks Steve.

malik641
05-26-2006, 12:29 PM
Amazing! It worked! :thumb

I read about the WBLOCK command in the help file...but I'm not sure how it fixed this problem....could you explain about it, Steve?


Thanks a lot!

lucas
05-26-2006, 12:50 PM
I use it as a quick purge....basically does away with everything your not using at the moment in time.....all the blocks your not using, etc. It also greatly reduces the size of the file sometimes

lucas
05-26-2006, 01:13 PM
I learned a nifty leader trick this week also Joseph. Use this for a button code:

^C^CLE;\\\;VERIFY;;


makes a 3 point leader with the word VERIFY

if you want to include a second line of text put it before the last ; and add another ; to the end of the command
also, if you use more than 3 points for leaders add the required number of \'s

malik641
05-30-2006, 05:19 AM
Interesting...and how about changing it to a spline leader line?

lucas
05-30-2006, 05:25 AM
save this as a lisp file:

;;; This routine draws an arc leader constructed with a polyline on the
;;; current layer. The standard dimension arrow is used. You can adjust
;;; its size by changing the value of DIMSCALE or DIMASZ.
;type aw at the AutoCAD command prompt to run
;;; ------------------------------------------------------------------------
(defun C:AW (/ TEMPCMD TEMPORTHO TEMPAUNIT TEMPLT TEMPPLW PT1 PT2
GAMA BETA ARFA ARCLENG RADIOUS TANANGLE ARWLENG AWIDTH
SINA COSA TANA A MIDANGLE PT3 ANG)
(setq TEMPCMD (getvar "cmdecho"))
(setq TEMPORTHO (getvar "orthomode"))
(setq TEMPAUNIT (getvar "aunits"))
(setq TEMPLT (getvar "celtype"))
(setq TEMPPLW (getvar "plinewid"))
(setvar "cmdecho" 0)
(setvar "celtype" "bylayer")
(setvar "orthomode" 0)
(setvar "aunits" 0)
; set arrow size
(setq ARWLENG (* (getvar "dimasz") (getvar "dimscale")))
(setq AWIDTH (/ ARWLENG 3.))
(if (setq PT1 (getpoint "\nStart Point: "))
(progn
(initget 1)
(setq PT2 (getpoint PT1 "\nEnd Point: "))
(princ "\nAngle: ")
(command "arc" PT1 "e" PT2 "d" pause)
;-------calculate start angle and radious of the arc-----
(setq GAMA (getvar "lastangle")) ;arc endpoint tan angle
(setq BETA (angle PT1 PT2))
(setq ARFA (- BETA GAMA))
(setq ARCLENG (distance PT1 PT2))
(setq RADIOUS (/ (* 0.5 ARCLENG) (sin ARFA)))
(setq TANANGLE (+ ARFA BETA))
(setq SINA (/ (* 0.5 ARWLENG) RADIOUS))
(setq COSA (sqrt (- 1 (* SINA SINA))))
(setq TANA (/ SINA COSA))
(setq A (atan TANA))
(setq MIDANGLE (- TANANGLE A))
(setq PT3 (polar PT1 MIDANGLE ARWLENG)) ;arrow end point
(command "erase" "l" "")
;-----draw pline arc and arrow------------------------------
(setq ANG (* 57.2958 (+ 3.14159 GAMA))) ;pline start angle
(setvar "fillmode" 1)
(command "pline" PT2 "w" "0" "0" "arc" "d" ANG
PT1 "l" "w" "0" AWIDTH PT3 "w" "0" "0" "")
) ;progn
) if pt1
(setvar "orthomode" TEMPORTHO)
(setvar "aunits" TEMPAUNIT)
(setvar "celtype" TEMPLT)
(setvar "plinewid" TEMPPLW)
(setvar "cmdecho" TEMPCMD)
(princ)
) ;end AW
(prompt "\nType AW to draw arc leader")
(princ)

malik641
05-31-2006, 03:09 PM
Man that's just a whole new language for me. I'll check it out tomorrow. Thanks Steve :thumb

lucas
05-31-2006, 03:33 PM
you have to apload it then call it from the command prompt with AW

malik641
05-31-2006, 05:20 PM
Right...I meant the syntax :yes