TheSwamp
Code Red => Visual DCL Programming => AutoLISP (Vanilla / Visual) => OpenDCL => Topic started by: highflyingbird 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.
-
Here is some Screen Captures.
-
Looks great.
Did you have a question, or where you just showing off your nice work?
-
Looks great, would you mind posting it here?
http://opendcl.com/forum/index.php?board=6.0 (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
-
Ni hao highflybird! Excellent work! :-)
-
Ni men hao! Hello,everybody! I am not goot at Englist. :-D
I am asking for help to solve these questions.Thanks!
-
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).
-
Owenwengerd:Thank you very much !Thank you!
and Le,Thank you!