( )
: , , , , . CAD/CAM (Computer-Aided Design/Computer-AidedManufacturing) , , .
-. -
(. 2.1) : , , , . . - -
. .
. , . 3D- .
CAM-: , (), , , -
(NC Numerical Control), .
( 1999 .) CAE/CAD/CAM-, . -
( , ): Unigraphics (EDS Unigraphics);
Solid Edge (Intergraph); Pro/Engineer (PTC Parametric Technology Corp.), CATIA (Dassault Systemes), EUCLID (Matra
Datavision), CADDS.5 (Computervision, PTC) .
: AutoCAD (Autodesk); ; bCAD ( , ); Caddy (Ziegler Informatics);
(, .); (Sprut Technology, ); ( , ).
, (): Cimatron, Microstation (Bentley), Euclid
Prelude (Matra Datavision), T-FlexCAD ( , ) . C
CAD/CAM- .
CA- , -
, , . CAE-
|
|
:
, , -
;
;
-
.
computer-aided manufacturing , , , . , , CAD.
− CAM (Computer Aided Manufacturing) − -
.
()
(, , , , ,
.). CAM -
(). -
-
. ,
CAM , CAD -
;
2 AutoCAD (VisualLISP, VBA, ObjectARX,.NET API).
AutoCAD :
- Visual C++;
- AutoLisp;
- Visual Basic for Application (VBA);
- Delphi;
- ARX;
- DCL.
AutoCAD, AutoLisp AutoCAD . AutoCAD utL_s, .
, AutoLisp , AutoCAD. , AutoLisp AutoCAD . utL_s , . (), . , AutoCAD, , utL_s . utL_s, AutoCAD .
, AutoLisp:
- AutoCAD;
- ( , AutoCAD);
|
|
- AutoCAD, ;
- ( ) , , AutoCAD, , , , ;
- AutoCAD, / .
, AutoLisp : - , .
AutoLisp . AutoLisp , AutoCAD.
AutoLisp, AutoCAD, , , , , .
utL_s . , DCL (Dialog Control Language), , . utL_s Lisp-. AutoCAD . DCL , : , , .. . , . AutoCAD utL_s, .
, AutoCAD.
AutoCAD VBA (Visual Basic for Application), AutoCAD Active Automation. AutoCAD AutoLisp. Active Automation AutoCAD, , ( , , , , AutoCAD: , , , , , ).
VBA , . , AutoCAD, , VBA , . , VBA Windows, (Word, Excel, Access .). (Access, Oracle, FoxPro, dBase, Paradox).
|
|
VBA . . Excel Access .
VBA AutoLisp DCL, Windows -, Active Automation.
ObjectARX - AutoCAD. Visual C++ C++, ObjectARX , AutoCAD , , , AutoCAD.
ObjectARX (DLL), AutoCAD AutoCAD. , AutoCAD (, , ..).
ObjectARX AutoCAD, . , , , MFC, , , .
, ObjectARX . AutoLisp, DCL VBA. , AutoCAD, . ObjectARX Visual C++ Autodesk Mechanical Desktop, Autodesk Land Desktop, Autodesk Map, Autodesk Civil Design AutoCAD.
:
1. , .
2. .
3. :
- AutoLisp , , , ;
- VBA , , Windows- AutoCAD ;
- ObjectARX AutoCAD , , , ; AutoCAD .
. , . , : , , . , . , C++, Assembler ARX.
|
|
NET
ObjectARX SDK API, AutoCAD.NET API. AutoCAD , .NET. AutoCAD, . Microsoft Visual Basic.NET (VB.NET) , ObjectARX.
.NET Framework Windows, -. .NET Framework (CLR) .NET Framework, ADO.NET, ASP.NET, Windows Forms, Windows Presentation Foundation (WPF) Windows Workflow Foundation (WF)..NET Framework , , .
NET Framework Microsoft, -.
Microsoft.NET , . , , C++ Microsoft.NET, , Delphi; C# , , Visual Basic.NET, , , C#, Delphi. () .NET , .
.NET-:
Microsoft Visual Studio (C#, Visual Basic.NET, Managed C++),
SharpDevelop,
MonoDevelop,
Eclipse,
Borland Developer Studio (Delphi for.NET, C#),
PascalABC.NET . .
.
Java, .NET -, . .NET MSIL (Microsoft Intermediate Language), CIL (Common Intermediate Language, ), IL. - ( .NET: ), , , , . CLR - JIT- (just in time, ) . (native) .NET Framework NGen.exe
AutoCAD 2010, , Visual Basic for Applications . VBA, . Windows VBA http://www.autodesk.com/vba-download. , , Autodesk VBA .NET . .NET API , , AutoLISP API ActiveX VBA. VBA .NET AutoCAD 2010.
, VBA AutoCAD, . .NET API API ActiveX VBA, VBA, .NET. , - . VBA.
~ Visual LISP ! AutoLISP, 2000, "", , . LISP- , LSP- . .
|
|
~ Visual LISP , AutoLISP - , , , . . , .
~ , Visual LISP ActiveX Automation, Microsoft.
ActiveX () () . - , Visual LISP ( VL-), AutoCAD. AutoCAD Visual LISP ( vla- vlax-).
VL- . Microsoft Office, . tlb olb , , ! HKEY_CLASSES_ROOT*Clsid , , VL-.
5 ()
, , AutoCad - : AutoCad, ( ), (, ..), ( AutoLisp), . COM . tlb (type library - ), .
3)
COM (Component Object Model) - , .
ActiveX Automation - , - .
- , . . , IAcadEntity. IAcadLine. AcDLine, Line.
vla-, vlax-, vlr- - , ActiveX Visual LISP. AutoCAD vl-load-com.
- , vlr-.
ActiveX Automation , , . ActiveX , , . ActiveX , .
AutoCAD COM (Component Object Model). , . AutoCAD ActiveX Automation, - . , , . , .
ActiveX AutoCAD , , , . (collections).
Application (AcadApplication). :
- Preferences ();
- VBE ( VBA-);
- Documents ();
- MenuBar ( );
- MenuGroups ( ).
, , . Documents Document - . MenuGroups MenuGroup( ). MenuBar PopupMenu ( , ).
Document. , , :
- Blocks ();
- ModelSpase ( );
- PaperSpace ( );
- Dictionaries ();
- DimStyles ( );
- Groups ();
- Layers ();
- Layouts ();
- Linetypes ( );
- Plot ();
- PlotConfigurations ( );
- Preferences ( );
- RegisteredApplications ( );
- SummaryInfo ( );
- SelectionSets ( );
- TextStyles ( );
- UCSs ( );
- Utility ();
- Viewports ( );
- Views ().
, . . , IAcadEntity. IAcadLine. AcDLine, Line.
ObjectX . . , , . . (Click) (onLoad). .
, ActiveX Visual LISP, vla -, vlax-, vlr. AutoCAD vl-load-com.
ActiveX . VLA -. VLA - , , .
, ActiveX, :
(defun begin_activex (/)(vl-load-com)(setq acad_app (vlax-get-acad-object))(setq active_doc (vla-get-activedocument acad_app))(setq model_space (vla-get-modelspace active_doc))(setq paper_space (vla-get-paperspace active_doc))); defunbegin_activex VLA -:
- acad_app AutoCAD;
- active_doc ;
- model_space ;
- paper_space .
VLA - AutoCAD (, .) . VLA - vlax-ename-< vla -object. vlax- vla -object-<ename.
VLA -, ActiveX : .
.
- vlax-make-safearray;
- vlax-safearray-put-element;
- vlax-safearray-fill.
LISP- :
vlax-safearray-get-dim;vlax-safearray-get-l-bound;vlax-safearray-get-u-bound;vlax-safearray-get-element;vlax-safearray-type.vlax-safearray-<list.
- , . . (vlax-make-variant [<> [<>]]).
, . , . <> .
Vlax-vbEmpty | ( ) | |
Vlax-vbNull | ( ) | |
Vlax-vbInteger | ||
Vlax-vbLong | ||
Vlax-vbSingle | ||
Vlax-vbDouble | ||
Vlax-vbString | ||
Vlax-vbObject | ||
Vlax-vbBoolean | ||
Vlax-vbArray |
, :
- vlax-variant-type - ;
- vlax-variant-value - ;
- vlax-variant-change-type - ;
- vlax-variant-type - .
ActiveX Visual LISP
ActiveX - , . ActiveX , , , . ActiveX (get functions) (put functions).
, - AutoLISP. ActiveX . .
AutoCAD , , ActiveX. Visual LISP ActiveX (vl-load-com) ↵
- ActiveX . ActiveX, . vla. ActiveX , , AutoLISP. vlax-ename-< vla -object. :
(setq vla-line (vlax-ename-<vla-object (entlast)))↵ Visual LISP :#<VLA-OBJECT IAcadLine 03612b14>:
Command: _line Specify first point: 5,5,0Specify next point or [Undo]: 15,-5,0Specify next point or [Undo]: *Cancel*Command: '_.zoom _eCommand: (vl-load-com)Command: (setq vla-line (vlax-ename-<vla-object (entlast)))#<VLA-OBJECT IAcadLine 01f1bb4c>vla. , VIEW - INSPECT. CONSOLE, (vlax-dump-object vla -line) ↵
. 9.2.
. 9.2. VLA
VLA -GET-STARTPOINT. vla, vla -line. :
(setq Starting (vla-get-startpoint vla-line))↵:
#<variant 8197 >variant , :
(safe-array-value (vlax-variant-value Starting))↵Visual LISP : (5.0 5.0 0)
StartPoint (0,0,0), :
(vla-put-startpoint vla-line (vlax-3d-point '(0 0 0)))↵AutoCAD. StartPoint VLA -GET-STARTPOINT.
(safe-array-value (vlax-variant-value (vla-get-startpoint vla-line)))↵Visual LISP : 1. 0.0 0.0
1996 ActiveX Automation - Microsoft . 1997 ActiveX AutoCAD VBA (Visual Basic for Applications). VBA Visual Basic , Microsoft, . VBA , , ActiveX Automation.
- ActiveX Automation , ActiveX Automation: C++, Delphi, Visual Basic. , AutoCAD. VBA AutoCAD (, ) - Microsoft .
1998 LISP- Visual LISP ActiveX. , AutoLISP.
. , , . , .
Circle () Center (). ( [. : WCS - . ]), . Center . [. : ] Circle GetOffsetCurves. , .
DXF-
, , - , , , , ; , .. DXF (Drawing exchange Format - ), , . . - DXF, - . 0, , . 8 , - . 10 - , 11 - .. , DXF . - , , DXF -1.
EDATA :
((-1. < : 60000020>)
(0. "LINE") -
(8. "0") -
(10 1.0 2.0 0.0) -
(11 6.0 6.0 0.0)
) -
DXF, EDATA . , . DXF.
9 ( 4 htm ??)
:
( ) .
.
.
.
.
, , , , .
:
IDE Visual LISP .
"ActiveX and VBA Reference" (, Objects > Block Object).
(Methods), (Properties) (Events).
, , , .
( , , VBA) .
, :
vlax-ename->vla-object,
vlax-vla-object->ename,
vlax-safearray->list
11 - , . (vlax-make-variant)
- , - (vlax-make-safearray- vlax-safearray-fill - )
13
~~