Author Topic: possibility to include more drawing option in the macro-drawing command  (Read 3491 times)

JJG

  • Hero Member
  • *****
  • Posts: 720
I think Designcad's developpers should work to give us the possility to include more drawing options in the drawing-command of basicad :

example : when you are drawing in Designcad, you have the possibility to add the snap grid (shurtcut "G"), or orthogonal-mode (shurtcut "H"), or Angle Constraint Mode, or Point Control (shurtcut "J") during the drawing command ; but not possible in basicad during a drawing_command ... why not  ??? 

Bob P

  • Hero Member
  • *****
  • Posts: 1168
    • Era Replica Automobiles
Re: possibility to include more drawing option in the macro-drawing command
« Reply #1 on: December 13, 2009, 11:15:30 AM »
sys(347) hasn't worked for you to switch into ortho mode?
Nor sys(17) to turn on the snap grid?

JJG

  • Hero Member
  • *****
  • Posts: 720
Re: possibility to include more drawing option in the macro-drawing command
« Reply #2 on: December 13, 2009, 12:41:37 PM »
Of course yes I known how theeses two sys-functions works, but they can't be used inside a drawing-command :

ex : imagine you draw a line, the two first points given by the code, the other as incomplete, but orthomode ... you must alway write a long macro to do that, using many ways ... it would be easyer whit a code such as :

>line
{
  <LineStyle  ....
  <PointXYZ [Ax, Ay, Az]
  <PointXYZ [Bx, By, Bz]
  <orthomode 1
  <incomplete
}

etc

It's just one (very simple) example !

« Last Edit: December 13, 2009, 12:51:16 PM by JJG »

Bob P

  • Hero Member
  • *****
  • Posts: 1168
    • Era Replica Automobiles
Re: possibility to include more drawing option in the macro-drawing command
« Reply #3 on: December 13, 2009, 05:04:47 PM »
You mean that putting orthomode before the <line command prevents the points from being placed correctly?

paulerens

  • Hero Member
  • *****
  • Posts: 915
Re: possibility to include more drawing option in the macro-drawing command
« Reply #4 on: December 14, 2009, 05:56:14 AM »
Do you mean, instead of,  interruptible snap, interruptible with one another macro?

JJG

  • Hero Member
  • *****
  • Posts: 720
Re: possibility to include more drawing option in the macro-drawing command
« Reply #5 on: December 14, 2009, 01:05:13 PM »
My first example is may be not good selected ... because it's too much easy to bypass the problem, or rather the lack of possibity of programming such as toggle on or off the snap grid, orthomode, point control, or angle constraint mode during a drawing-command in macro language.

also another example :
I always use the snapgrid before setting the last point with dimension-commande (manualy) : it's a very good an easy way to draw and to implant the dimensions each-other properly, with good and regular spacing out, etc ...(of course I choose previouly a pace of snap grid in connection with dimensions text size, generaly 2x DimensionTextSize ; a macro can do that)
That mean's that I systematically toggle on the snap grid manualy (through shurt cut "G") just before setting the last point of dimension-command, of course during the dimension-command, and I desactive it just after setting the last point.
(I report, in passing, that this "function" concerning dimension automatic each-other spacing out, which lack to Desingcad, works very good in such other cad-program like Autocad, Solidworks etc ...may be Turbocad too ?) OK

But how to do that automatically (snap grid "on" during dimension-command just for setting last point), with a macro ???

That's why, for example, I'm asking for such possibilities.

More generaly, if you want to create dynamicaly "customising" drawing-command, with a little more automation than basics desingcad-drawing-commands, and also with a good prewiew of what you are doing, you'll understand that you need such more possibilities.
« Last Edit: December 14, 2009, 01:08:10 PM by JJG »

Lar

  • Hero Member
  • *****
  • Posts: 2620
Re: possibility to include more drawing option in the macro-drawing command
« Reply #6 on: December 17, 2009, 11:07:35 AM »
JJG, below is how you would do your 1st example:

'*****MacroStart*****
>OrthoMode
{
}

>Line
{
  '<LineStyle  ....
  <PointXYZ [1,2,3]
  <PointXYZ [4,5,6]
  <incomplete
}

>OrthoMode
{
}
'***MacroEnd***

The trick is to activate OrthoMode before the drawing command. Point commands within basiccad drawing command (PointXYZ, PointRel, etc) are not influenced by the OrthoMode command so ortho isn't used until the command ends. The >Line command ends but because of the <incomplete the line itself is unfinished. This is where the first ortho influences the mouse movements made by the user to complete the line.

The second >OrthoMode turns ortho off.

Lar

paulerens

  • Hero Member
  • *****
  • Posts: 915
Re: possibility to include more drawing option in the macro-drawing command
« Reply #7 on: December 17, 2009, 03:54:14 PM »
Hi JJG,
This, may be?
Sys(15)=0
Sys(17)=0
>Origin 'or Getxy
{
 }
Sys(15)=1
Regen
>Dimension
{
 Sys(17)=1
 <Color 255,255,255
  <Layer 200
   <Axis 1
    <Orientation 0
     <Precision 3
      <Pointxyz 0.000 ,0.000 ,0.000
       <incomplete
  }
  Sys(15)=0
  Regen
  End
« Last Edit: December 17, 2009, 05:30:38 PM by paulerens »

JJG

  • Hero Member
  • *****
  • Posts: 720
Re: possibility to include more drawing option in the macro-drawing command
« Reply #8 on: December 18, 2009, 03:07:44 PM »
Thanks Lar and paulerens for your reply and your interest of this topic.
To Paulerens :
No !!! 
« Last Edit: December 18, 2009, 03:16:24 PM by JJG »

dcadRob

  • Hero Member
  • *****
  • Posts: 688
Re: possibility to include more drawing option in the macro-drawing command
« Reply #9 on: December 18, 2009, 03:38:04 PM »
I think that this can be done now with OLE automation. Not as simple as BasicCAD but doable.