News:

Please note new Forum URL: forum.designcad.com

Main Menu
DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Dimension from decimal to fractions

Started by Pearco, November 10, 2014, 04:39:46 PM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Pearco

Hi All,

I have written a macro that will give a dimensioned part and inserted it to a printed out put that works fine. Here is the code section for that.

      >Text               'print stiles
      {
      <pointxyz [x1 + (Width+30)],[y1 + (Height/2)]

      S$ = (Height-Toespace)
      <Color 0,0,0
      Sys(257) =1
      <Text " 2 pcs of stile [S$] "
      Sys(258) =0

      }

It will print 2 pcs of stile 30.500.
This is correct, but I would like to change the decimal to read 30 1/2".
If it can be done it would make cutting all of the parts less error prone.
This is for custom cabinetry that is never the same size.
I am open to any suggestions or corrections.

Thanks
Jim
User since ProDesign 1.5

edgar

Impulse wrote most of this but I suspect that I wrote the brute force conversion between decimal fractions and compound fractions. It's ugly but it works; look at the code starting around line number 125.
-Ed