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.

2D Box Orientation Code

Started by aqua, March 09, 2007, 10:25:10 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

aqua

Designcad 13.13

In macro code, if I add a 2D box, does anyone know if there is any sys(..)=.. code that will turn the orientation back to zero after I add a 2D box.

I guess when esc from the macro, I can add another box with <Orientation 0, then Undo
However - I would prefer macro code.

Also, does anyone know where Designcad hides this 2D Box orientation setting, i.e if you draw a box, when you go to repeat this task, Designcad remembers the last settings for the "Align to any angle" option in the 2D dialog box. This must be stored somewhere.

Regards Frank


>2DBox
{
  <Color 0,0,0
  <Layer 1
  <LineStyle 0,20.0000,0.0000
  <PointXYZ [0,0,0]
  <PointXYZ [100,100,0]
  <PointXYZ [200,200,0]
  <Type 1
  <Orientation 1
  }

impulse

I assumming that v13.3 does not have the <null parameter available, I think it came later.

Instead of drawing this with the >2dbox function and disturbing the <orientation parameter why dont you just use  a series of >Line commands

aqua

Impulse


I am wanting to use the 2D box to draw a rectangle at any angle.
There will be not xyz points in the macro code
Rather the code will allow the user to set the 3 points to define the rectangle

Regards Frank


2DBox
{
  <Color 0,0,0
  <Layer 1
  <LineStyle 0,20.0000,0.0000
  <Type 1
  <Orientation 1
  }

DrollTroll

Actually, 13.0.013 *does* have the <Null parameter.

So, you can use this:

>2DBox
{
  <Color 0,0,0
  <Layer 1
  <LineStyle 0,20.0000,0.0000
  <Type 1
  <Orientation 1
  }
 
>2DBox
{
  <Orientation 0
  <Null
} 


To draw your aligned box, then reset the option afterwards.

Use of the <NULL parameter essentially sets whatever command parameters you want without actually running the command.
25 years with DesignCAD