Home > other >  How to use cad draw arrows
How to use cad draw arrows

Time:09-24

1, the first input VLIDE command, enter the following interface

(hereinafter referred to as vl interface)
2, click the menu bar vl interface file - & gt; New document, an unnamed window, drawing code again write
3, in the build file to write the following code

(defun c: ss (/p p7 p1 p2 p3 p4 p5 alf BHP); Defun c: to define the function of the CAD command, strarr for the new command name
(setvar "osmode" 0); Shut down the target capture state or draw a straight line with short line occurs when "zero length linear
"(setq p (getpoint "the mouse arrow selected vertex positions")); Arrow interactively input vertex coordinates,
(setq p7 (getpoint "mouse selected starting point"));
The arrow width (setq p3 (getdist ""));
(setq p4 (1)/p3)
(setq p5 (6) * p3)
(setq alf (atan p4, p5)); In polar coordinates method for marking the rest of the coordinates of each point
P (- (setq p1 (polar Angle p (p7) alf) (/p5 (cos alf))))
(setq p2 (polar p (+ (Angle p p7) alf) (/p5 (cos alf))))
(the command "line" p p1 p2 p ""); Call AutoCAD line command, according to the coordinates of each point draw line contour
(setq BHP (polar Angle p (p7) p (2)/(p5)); Within the filling line auxiliary point, which is located in the border line
(the command "bhatch" "p" "solid" BHP ""); Call the AutoCAD bhatch command, filled with pure color boundary
(the command "line" p p7 "")
(the command "osnap" "the endpoint, the midpoint, center, the node"); Restore CAD model of target capture
)
4, check the statement for grammatical errors: in the menu bar of the tool - & gt; Check the editor's words, will pop up & lt; Compiler output & gt; Window shows the results
, it says "check complete" without grammatical mistakes, if any mistakes in grammar shows error statement
5, choose the code editor window, click the tools menu bar - & gt; Load the compiler file, the console prompt loaded;
Ss command 6, input, please input the relevant command can generate a custom arrow arrow width
7, generated LSP files and load using
After the check code correctly, select vl window not named file window - & gt; Click the file menu bar - & gt; Save and close the vl interface
To return to the interface of cad, click on the tools menu bar - & gt; AutoLisp - & gt; Load the application, load application popup Windows;
8, select save before LSP file, and click the load, the status bar below shows "has been successfully loaded" at this point you can use this command
Draw the arrow

  • Related