Consulting

Results 1 to 13 of 13

Thread: Solved: AutoCAD 2004 - SHX Fonts and an error

  1. #1
    Administrator
    2nd VP-Knowledge Base
    VBAX Master malik641's Avatar
    Joined
    Jul 2005
    Location
    Florida baby!
    Posts
    1,533
    Location

    Solved: AutoCAD 2004 - SHX Fonts and an error

    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...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 Appreciate it!




    New to the forum? Check out our Introductions section to get to know some of the members here. Feel free to tell us a little about yourself as well.

  2. #2
    VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    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...
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  3. #3
    Administrator
    2nd VP-Knowledge Base VBAX Master malik641's Avatar
    Joined
    Jul 2005
    Location
    Florida baby!
    Posts
    1,533
    Location
    Who's Pete??

    Anyway, thanks George for the reply

    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...




    New to the forum? Check out our Introductions section to get to know some of the members here. Feel free to tell us a little about yourself as well.

  4. #4
    VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    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.
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  5. #5
    Administrator
    2nd VP-Knowledge Base VBAX Master malik641's Avatar
    Joined
    Jul 2005
    Location
    Florida baby!
    Posts
    1,533
    Location
    ...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.




    New to the forum? Check out our Introductions section to get to know some of the members here. Feel free to tell us a little about yourself as well.

  6. #6
    Administrator
    2nd VP-Knowledge Base VBAX Master malik641's Avatar
    Joined
    Jul 2005
    Location
    Florida baby!
    Posts
    1,533
    Location
    Amazing! It worked!

    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!




    New to the forum? Check out our Introductions section to get to know some of the members here. Feel free to tell us a little about yourself as well.

  7. #7
    VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    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
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  8. #8
    VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    I learned a nifty leader trick this week also Joseph. Use this for a button code:
    [VBA]
    ^C^CLE;\\\;VERIFY;;
    [/VBA]

    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
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  9. #9
    Administrator
    2nd VP-Knowledge Base VBAX Master malik641's Avatar
    Joined
    Jul 2005
    Location
    Florida baby!
    Posts
    1,533
    Location
    Interesting...and how about changing it to a spline leader line?




    New to the forum? Check out our Introductions section to get to know some of the members here. Feel free to tell us a little about yourself as well.

  10. #10
    VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    save this as a lisp file:
    [VBA]
    ;;; 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)
    [/VBA]
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  11. #11
    Administrator
    2nd VP-Knowledge Base VBAX Master malik641's Avatar
    Joined
    Jul 2005
    Location
    Florida baby!
    Posts
    1,533
    Location
    Man that's just a whole new language for me. I'll check it out tomorrow. Thanks Steve




    New to the forum? Check out our Introductions section to get to know some of the members here. Feel free to tell us a little about yourself as well.

  12. #12
    VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    you have to apload it then call it from the command prompt with AW
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  13. #13
    Administrator
    2nd VP-Knowledge Base VBAX Master malik641's Avatar
    Joined
    Jul 2005
    Location
    Florida baby!
    Posts
    1,533
    Location
    Right...I meant the syntax




    New to the forum? Check out our Introductions section to get to know some of the members here. Feel free to tell us a little about yourself as well.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •