Summary of cad secondary development based on ObjectArx

Recently someone asked me how to learn ObjectArx? Basic knowledge of C ++, understanding MFC and CAD operation is basically enough. It is very easy and convenient to write some arx plug-ins suitable for your drawing. If you want to do more in-depth research, you need more knowledge reserves, including computer graphics, including other professional knowledge and so on. The following are some of my own knowledge of CAD development that I told him at the time.
Insert picture description here
To be honest, it is not difficult for a person to develop a tool set suitable for his own use, it is difficult in a large business, and it is difficult in a general-purpose software. For large-scale software, it is too painful and too closed to do it by yourself. What you think is difficult to write may be mature by others, so you can usually go to the forum to communicate and see more excellent plugins written by others. Not to mention the general type, as far as the structural profession is concerned, what you draw through parametric drawing may be different from the standards of other design institutes, and maybe even the layer name is different. The large-scale software circulating on the market is generally of the leading nature. All design institutes use its standards or customize them based on their standards. Taking Tianzheng and Explorer as examples.
When I was working in the design institute, there was a person in the company who knew how to develop lisp, and then he made a tool set, similar to a professional toolbox for young guys. It contains most of the functions required by the structure, including modeling, insertion and merge of calculation books, wall pillar tools, foundation, basic drawing-painting wall beams and plates, batch printing, drawing review marks, easy selection, reinforcement assistant, fast There are a lot of calculation software and so on, because it is only used in the company, so the specified layers, text styles, line styles, and printing styles are independent. This software may go to other design institutes, so it is not so versatile. I remember when there was a demo of the new version, the boss at the time said that this tool was used and feedbacked by the company's structural department. If there is no problem, the company will buy it at 20W. Of course, the price of software encryption and later maintenance must also be included in this price, not too much. When I left at that time, the version was updated to 3.0, and I don't know what happened later. The only thing I am very impressed with is that it has a function called text substitution. What is the use of this? Suppose there is a rebar text is 2d20, two 20 bars, and then you want to modify it to 2d10, then how do you change it, the reinforcement assistant has this function, you can directly modify a panel, but it is also slow. There are also functions similar to screen change, but they are not well written. Its function is that you press the number 1 to build, and then click the mouse on the 2 of the reinforcement text, it will be changed, the speed block. The only downside is that it sacrifices the advantage of changing the numeric keys to shortcut keys. Some people like to change the numeric keys such as 1, 2, 3 to the function of modifying the color of the entity. . .
Writing a plug-in yourself can greatly speed up your drawing efficiency. Ordinary people use cad, learn to use model files, learn to use blocks, refer to, learn most of the functions of cad, and drawing efficiency is much stronger than most people. If you need to be faster, you can only start with secondary development. Lisp, c #, vba, and c ++ are all suitable. C ++ is more difficult, but the benefits are also high. I don't really like lisp, I feel that lisp programming is a bit anti-human. But Lisp can communicate with Objectarx, which is very good, and can cooperate with others.
Regarding the writing of code, generally speaking, people who engage in drawing learn cad secondary development, the quality of the code is generally not very good, this requires effort, and see how others write good code. I remember a netizen showed me the code he wrote, a lot of common classes were written in a project, such as CLineUtil, CArcUtil, etc., but he did not encapsulate these into a DLL, resulting in an ARX file size of 5, 6M, the key is that this ARX may only have one function. There is also a cpp file with more than 10,000 lines of code. Well, not much to say. . .

78 original articles published · Like 16 · Visits 60,000+

Guess you like

Origin blog.csdn.net/zeqi1991/article/details/104730976