Recent Posts

Pages: [1] 2 3 ... 10
1
CAD General / Re: Transform a Mesh into 3D Solid
« Last post by Bryco on September 15, 2019, 02:49:55 PM »
Autocad could do better with this. We use rhino a lot to work with mesh.

However if you explode the mesh then extrude the 3dfaces by say -.0001 you have solids (many not one) that you can section and flatshot.
2
AutoLISP (Vanilla / Visual) / Re: A "223" bug in all the versions?
« Last post by Rod on September 15, 2019, 03:37:15 AM »
Never saw it until you posted and bought it to the top again under NEW
Must admit I always try to read about bugs
3
Dynamic Blocks / Re: STRETCHABLE TRUSS
« Last post by ribarm on September 14, 2019, 11:43:21 AM »
BricsCAD 18
I think you broke it?

I don't know... I haven't found similar things in my past and I only recently installed BCAD 19... But I think that my posted dynamic block is not much applicable, as you have to predict many lines and assign to them all at the end constraints... I ended with this simple version that uses linear array, but I am not able to keep lengths of middle members as I don't know how to apply action act on other direction action like on entities... It seems that in some simple way it is performing stretching correct on all arrayed instances, but when I want to constrain lengths of middle members it is acting only on first instance, so I abandoned this method and only did it with simple stretching in Y direction and array in X...
4
Dynamic Blocks / Re: STRETCHABLE TRUSS
« Last post by CAB on September 14, 2019, 07:58:35 AM »
BricsCAD 18
I think you broke it?
5
Dynamic Blocks / Re: STRETCHABLE TRUSS
« Last post by ribarm on September 14, 2019, 03:31:14 AM »
I've fixed it...
HTH.
M.R.
6
AutoLISP (Vanilla / Visual) / Re: SHX to TTF
« Last post by cmwade77 on September 14, 2019, 12:42:18 AM »
Ok, I have managed to make this change that works:
Code: [Select]
(defun subfont (OldFont NewFont / Doc sty sname FntPth FntNoExt TypeFace cBold cItalic CharSet P&Fam FontExt ChangeFont)
  (vl-load-com)
  (setq doc (vla-get-activedocument
      (vlax-get-acad-object)
    )
  )
  (vla-startundomark doc)
  (if (wcmatch (strcase (getvar "platform")) "*WINDOWS*")
    (if (findfile (strcat (getenv "WINDIR") "\\fonts\\" NewFont))
      (setq FntPth (strcat (getenv "WINDIR") "\\fonts\\" NewFont))
      (setq FntPth (findfile NewFont))
    )
    (setq FntPth (findfile NewFont))
   )
   (setq FntNoExt (vl-filename-base FntPth))
   (if (= Bold T)
    (setq Bold :vlax-true)
    (setq Bold :vlax-false)
   )
   (if (= Italic T)
    (setq Italic :vlax-true)
    (setq Italic :vlax-false)
   )
   (setq sty (vla-get-textstyles doc))
   (vlax-for s sty
            (setq cFontFile (vla-get-fontfile s)
                  FontExt (vl-filename-extension cFontFile)
                  ChangeFont T
            )
            (if (= (strcase cFontFile) (strcase OldFont))
                (progn
                    (vla-put-fontfile s FntPth)
                )
            )
       
   
   )
  (vla-endundomark doc)
  (princ)
)

(defun C:FontSub ()
    (subfont "helvbld.shx" "Helvetica Bold.ttf")
    (subfont "hlvm1d.shx" "Helvetica Bold.ttf")
    (subfont "helvm2.shx" "Helvetica Bold.ttf")
    (subfont "romans.shx" "RomanS_New.ttf")
    (subfont "romand.shx" "RomanS_New.ttf")
    (subfont "romans_struc.shx" "RomanS_New.ttf")
    (subfont "simplex.shx" "RomanS_New.ttf")
    (subfont "x-hlvm1d.shx" "Helvetica Bold.ttf")
    (subfont "osafrac.shx" "RomanS_New.ttf")
    (subfont "txt.shx" "RomanS_New.ttf")
    (command "._regenall")
    (princ)
)
Cmwade I don't see where this will ever return a value other than false?
Code - Auto/Visual Lisp: [Select]
  1.   (if (= bold t)
  2.     (setq bold :vlax-true)
  3.     (setq bold :vlax-false)
  4.   )
  5.   (if (= italic t)
  6.     (setq italic :vlax-true)
  7.     (setq italic :vlax-false)
  8.   )

That being said if it comes into play could be written as this:
Code - Auto/Visual Lisp: [Select]
  1. (setq bold (if bold :vlax-true :vlax-false))
  2. (setq italic (if italic :vlax-true :vlax-false))

Just a quick observation :)

Oops that is actually a remnant from an abandoned part of the code that I found out I didn't need. O should eliminate that one.
7
AutoLISP (Vanilla / Visual) / Re: SHX to TTF
« Last post by ronjonp on September 14, 2019, 12:17:49 AM »
Ok, I have managed to make this change that works:
Code: [Select]
(defun subfont (OldFont NewFont / Doc sty sname FntPth FntNoExt TypeFace cBold cItalic CharSet P&Fam FontExt ChangeFont)
  (vl-load-com)
  (setq doc (vla-get-activedocument
      (vlax-get-acad-object)
    )
  )
  (vla-startundomark doc)
  (if (wcmatch (strcase (getvar "platform")) "*WINDOWS*")
    (if (findfile (strcat (getenv "WINDIR") "\\fonts\\" NewFont))
      (setq FntPth (strcat (getenv "WINDIR") "\\fonts\\" NewFont))
      (setq FntPth (findfile NewFont))
    )
    (setq FntPth (findfile NewFont))
   )
   (setq FntNoExt (vl-filename-base FntPth))
   (if (= Bold T)
    (setq Bold :vlax-true)
    (setq Bold :vlax-false)
   )
   (if (= Italic T)
    (setq Italic :vlax-true)
    (setq Italic :vlax-false)
   )
   (setq sty (vla-get-textstyles doc))
   (vlax-for s sty
            (setq cFontFile (vla-get-fontfile s)
                  FontExt (vl-filename-extension cFontFile)
                  ChangeFont T
            )
            (if (= (strcase cFontFile) (strcase OldFont))
                (progn
                    (vla-put-fontfile s FntPth)
                )
            )
       
   
   )
  (vla-endundomark doc)
  (princ)
)

(defun C:FontSub ()
    (subfont "helvbld.shx" "Helvetica Bold.ttf")
    (subfont "hlvm1d.shx" "Helvetica Bold.ttf")
    (subfont "helvm2.shx" "Helvetica Bold.ttf")
    (subfont "romans.shx" "RomanS_New.ttf")
    (subfont "romand.shx" "RomanS_New.ttf")
    (subfont "romans_struc.shx" "RomanS_New.ttf")
    (subfont "simplex.shx" "RomanS_New.ttf")
    (subfont "x-hlvm1d.shx" "Helvetica Bold.ttf")
    (subfont "osafrac.shx" "RomanS_New.ttf")
    (subfont "txt.shx" "RomanS_New.ttf")
    (command "._regenall")
    (princ)
)
Cmwade I don't see where this will ever return a value other than false?
Code - Auto/Visual Lisp: [Select]
  1.   (if (= bold t)
  2.     (setq bold :vlax-true)
  3.     (setq bold :vlax-false)
  4.   )
  5.   (if (= italic t)
  6.     (setq italic :vlax-true)
  7.     (setq italic :vlax-false)
  8.   )

That being said if it comes into play could be written as this:
Code - Auto/Visual Lisp: [Select]
  1. (setq bold (if bold :vlax-true :vlax-false))
  2. (setq italic (if italic :vlax-true :vlax-false))

Just a quick observation :)
8
AutoLISP (Vanilla / Visual) / Re: SHX to TTF
« Last post by MP on September 14, 2019, 12:06:07 AM »
To date those I serve have accepted Consolas as an alternate. The reason Consolas was chosen - aside from it's appearance - was the requirement to use vanilla AutoCAD / Windows fonts. Nonetheless, it is kind and generous of you to share RomanS_New ó no doubt others will benefit. Thanks cmwade77.
9
AutoLISP (Vanilla / Visual) / Re: SHX to TTF
« Last post by cmwade77 on September 13, 2019, 07:58:10 PM »
I canít post the work Iíve done with text styles and fonts but I can share that itís very do-able via objectdbx (fast) and weíve found the Consolas true type font is a good alternate for RomanS. Cheers.
I had tried that one, my boss didn't like it, as I said, I was finally able to modify the RomanS TTF to actually be readable when plotted, in fact as near as I have found, it plots identical to the romans.shx font now.

I have attached it here for those that may need it, please note that I have called the font RomanS_New.
10
AutoLISP (Vanilla / Visual) / Re: SHX to TTF
« Last post by cmwade77 on September 13, 2019, 07:51:35 PM »
Ok, I have managed to make this change that works:
Code: [Select]
(defun subfont (OldFont NewFont / Doc sty sname FntPth FntNoExt TypeFace cBold cItalic CharSet P&Fam FontExt ChangeFont)
  (vl-load-com)
  (setq doc (vla-get-activedocument
      (vlax-get-acad-object)
    )
  )
  (vla-startundomark doc)
  (if (wcmatch (strcase (getvar "platform")) "*WINDOWS*")
    (if (findfile (strcat (getenv "WINDIR") "\\fonts\\" NewFont))
      (setq FntPth (strcat (getenv "WINDIR") "\\fonts\\" NewFont))
      (setq FntPth (findfile NewFont))
    )
    (setq FntPth (findfile NewFont))
   )
   (setq FntNoExt (vl-filename-base FntPth))
   (if (= Bold T)
    (setq Bold :vlax-true)
    (setq Bold :vlax-false)
   )
   (if (= Italic T)
    (setq Italic :vlax-true)
    (setq Italic :vlax-false)
   )
   (setq sty (vla-get-textstyles doc))
   (vlax-for s sty
            (setq cFontFile (vla-get-fontfile s)
                  FontExt (vl-filename-extension cFontFile)
                  ChangeFont T
            )
            (if (= (strcase cFontFile) (strcase OldFont))
                (progn
                    (vla-put-fontfile s FntPth)
                )
            )
       
   
   )
  (vla-endundomark doc)
  (princ)
)

(defun C:FontSub ()
    (subfont "helvbld.shx" "Helvetica Bold.ttf")
    (subfont "hlvm1d.shx" "Helvetica Bold.ttf")
    (subfont "helvm2.shx" "Helvetica Bold.ttf")
    (subfont "romans.shx" "RomanS_New.ttf")
    (subfont "romand.shx" "RomanS_New.ttf")
    (subfont "romans_struc.shx" "RomanS_New.ttf")
    (subfont "simplex.shx" "RomanS_New.ttf")
    (subfont "x-hlvm1d.shx" "Helvetica Bold.ttf")
    (subfont "osafrac.shx" "RomanS_New.ttf")
    (subfont "txt.shx" "RomanS_New.ttf")
    (command "._regenall")
    (princ)
)
Pages: [1] 2 3 ... 10