Author Topic: OpenDCL + Reactors  (Read 5624 times)

0 Members and 1 Guest are viewing this topic.

highflyingbird

  • Bull Frog
  • Posts: 415
  • Later equals never.
OpenDCL + Reactors
« on: July 14, 2007, 02:49:05 AM »
I am studying the knowledge of OpenDCL and Reactors. So by the way, I finished this routine.
This code like the function of the 3dsmax : Spacing tool.It can array place the CAD OBJECTs along curve or line, like array.The code has the following three functions.

I:
If you select Text, then the Text is placed along the curve, like the extension of the function "ArcAlignedText" in Express tools. But now the curve is not only arc, and also other kind of curve lines.

II:
If you select a selection of some object, then the selection will be array placed along the curve path. It is just some copy of the selection,not block or group.

III
If you select block, then the block will be array placed along the curve path, the block can be insert in random scale.(maybe it's useful in some case)

All the curve array object can be associated to the curve path. If the association is permanent, then you will have to load this code again when you open the file next time. If the mouse double click reactor is associated, you can double click on the arrayed object or path, the dialog box will popup, then you can change the parameters. If you use the grip to move or rotate the curve path, then the arrayed object will move to new place automatically.

« Last Edit: July 14, 2007, 11:35:50 PM by highflybird »
I am a bilingualist,Chinese and Chinglish.

highflyingbird

  • Bull Frog
  • Posts: 415
  • Later equals never.
Re: OpenDCL + Reactors
« Reply #1 on: July 14, 2007, 03:38:44 AM »
Here is some Screen Captures.
« Last Edit: July 14, 2007, 03:52:29 AM by highflybird »
I am a bilingualist,Chinese and Chinglish.

BazzaCAD

  • Guest
Re: OpenDCL + Reactors
« Reply #2 on: July 14, 2007, 04:33:46 AM »
Looks great.
Did you have a question, or where you just showing off your nice work?
« Last Edit: July 17, 2007, 09:57:34 AM by BazzaCAD »

highflyingbird

  • Bull Frog
  • Posts: 415
  • Later equals never.
Re: OpenDCL + Reactors
« Reply #3 on: July 14, 2007, 05:32:27 AM »
Looks great, would you mind posting it here?
http://opendcl.com/forum/index.php?board=6.0
Did you have a question, or where you just showing off your nice work?
Yes ,I have some question in this routine.
1. when I in the  "double click" process,and interact with DWG,maybe some error message:
   *invalid  selection* ,expects a point or Last...
   and when I Double Click at a reactor object,then  pop up a  dialog, but  it can't display the block in blockview.
2. Sometimes I can't use this routine under AutoCAD R2008.When the main Dialog be pop up ,the CAD will exit .
   I don't know why.
3.color system may be  different from the  color system of AutoCAD ?
   for  expamle ,I got a  same  Number:(420 . 4600015) , then (dcl_Control_SetBackColor ...._Form1_Color 4600015),but it's different from the color of acad.
                       
            highflybird@msn.com

 
« Last Edit: July 18, 2007, 12:31:48 AM by highflybird »
I am a bilingualist,Chinese and Chinglish.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8702
  • AKA Daniel
Re: OpenDCL + Reactors
« Reply #4 on: July 14, 2007, 09:00:20 AM »
Ni hao highflybird! Excellent work! :-)

highflyingbird

  • Bull Frog
  • Posts: 415
  • Later equals never.
Re: OpenDCL + Reactors
« Reply #5 on: July 15, 2007, 10:09:59 PM »
Ni men hao! Hello,everybody! I am not goot at Englist.  :-D
I am asking for help to solve these questions.Thanks!
I am a bilingualist,Chinese and Chinglish.

owenwengerd

  • Bull Frog
  • Posts: 451
Re: OpenDCL + Reactors
« Reply #6 on: July 15, 2007, 11:50:28 PM »
1. when I in the  "double click" process,and interact with DWG,maybe some error message:
   *invalid  select* ,must be  a point or Last...
   and when I Double Click at a reactor object,then  pop up a  dialog, but  it can't display the block in blockview.

This sounds like the typical problem encountered in object and database reactors. During a reactor callback, some database objects (in the case of object reactors, at least the object that triggers the reactor) are open and cannot be operated on by the reactor code. If this is the case, the only solution is to cache the object IDs and wait to operate on them at a later time (for example, during a command-ended reactor).


2. Sometimes I can't use this routine under AutoCAD R2008.When the main Dialog be pop up ,the CAD will exit .
   I don't know why.

This was a bug that could happen when the option list control's DefaultSelection property contained a value with no corresponding option. I have fixed this bug for RC4.


3.color system may be  different from the  color system of AutoCAD ?
   for  expamle ,I got a  same  Number:(420 . 4600015) , then (dcl_Control_SetBackColor ...._Form1_Color 4600015),but it's look different from the color of acad.

AutoCAD and OpenDCL use reversed RGB (Red/Green/Blue) orders. In AutoCAD, converting the decimal color value into hexadecimal results in a color value of the form 0x00RRGGBB, but Windows (and thus OpenDCL) expects it in the form 0x00BBGGRR. I suspect this was unintentional on the part of the original ObjectDCL design.

For example, the AutoCAD color 4600015 in hexadecimal is 0x004630CF (Red=46, Green=30, Blue=CF). To specify the equivalent color in OpenDCL, use 0x00CF3046 (or 13578310 decimal).

highflyingbird

  • Bull Frog
  • Posts: 415
  • Later equals never.
Re: OpenDCL + Reactors
« Reply #7 on: July 17, 2007, 02:41:30 AM »
Owenwengerd:Thank you very much !Thank you!

and Le,Thank you!
I am a bilingualist,Chinese and Chinglish.