Rapid drawing of Mechanical graphic center line in AutoCAD

Source: Internet
Author: User

In mechanical engineering drawing, the Central line is the most common kind of graph line, the application scope is very wide, the use is very frequency tight. Although AutoCAD provides the command to draw straight lines, but does not directly provide the command to draw the standard centerline, if the user wants to draw the standard centerline, it is necessary to set the line style and proportion of the standard centerline according to the national drawing standard beforehand, and after loading, draw a straight line segment with the Straight line section It is tedious and error-prone to use the graphical editing commands to edit and modify to get the desired centerline. In fact, AutoCAD has an open architecture and multiple industry standards, allowing users to use advanced programming language to expand and modify it, using this feature, this paper introduces a rapid drawing of mechanical graphics standard Center line method, according to this method, users can quickly, Accurately draw the required mechanical graphics center line.

First, the national machinery drawing standard to the Central line requirements

In mechanical engineering drawing, the National drawing standard (GB/t 4457.4-2002) provides a detailed specification of the representation of the Central line, as shown in Figure 1, fig. 2.

Principle and method of realizing center line drawing quickly

AutoCAD has 11 drop-down menus and 30 toolbars, and its common internal commands can be executed by Drop-down menu commands and Tool buttons. To quickly draw the standard center line of mechanical graphics, users should re-create a new internal command to draw the Central line directly, by using the VLISP integrated development environment embedded in AutoCAD to write program code to define standard centerline line style, load standard centerline and draw standard center line respectively, The coding code generates the application that can be executed directly and transforms it into an internal command that can be executed directly in an AutoCAD environment, modifies the AutoCAD menu file, and adds a menu command and tool button to draw the standard centerline in the Drop-down menu. Finally, the menu commands and tool buttons are used to draw the standard center line of mechanical graphics.

(i) Line customization of standard centerline

AutoCAD has three kinds of linear files: ACAD. LIN, Acadiso. LIN, IGES. LIN, where Acadiso.lin is automatically loaded at startup, and in order to be easy to use, the new line style is defined in general Acadiso.lin files. According to the national drawing standard, the standard centerline line style of mechanical drawings is defined as follows:

*ZXL, center Line

A, 10,-1,1,-1,10,-1,1,-1

The customization of the standard centerline can be written as follows Vlisp code according to the command line input requirements for line-style customization:

(Defun C:ZXL ()

(Command "-linetype" "C" "ZXL" "Acaddiso.lin"

"Centerline" "10,-1,1,-1,10,-1,1,-1" "" "

(Princ)

)

In the Vlisp integration environment, loading the above code, directly in the AutoCAD command line to execute the ZXL command, custom standard centerline success, users can be in the AutoCAD "load or overload Line Style" dialog box to see the existence of ZXL style.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.