HCBBS Forum (English)
Submit Chemical Projects / Find Solutions
Amplify Your Requirements on a Broader Chemical Platform *Engineering · Technology · Equipment · Solutions*
Submit Request

LSP for automatic drawing numbering

2008-02-26View Original

Thread Content

;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * autonumber (defun c:bh (/ oce1 n1 zn h1 sxh1 p1) (vl-load-com) (setq oce1 (getvar "cmdecho")) (setvar "cmdecho" 0) (setq ms (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object)) ) ) (if qz () (setq qz "") ) (if hz () (setq hz "") ) (initget "c") (setq nqz (getstring (strcat "\nPlease enter the prefix/c(empty): " ))) (cond ((= nqz "c") (setq qz "")) (T (if (/= nqz "")(setq qz nqz))) ) (setq nhz (getstring (strcat "\nPlease enter the suffix /c (empty): " ))) (cond ((= nhz "c") (setq hz "")) (T (if (/= nhz "")(setq hz nhz))) ) (if (not (setq n1 (getint "\nPlease enter the starting sequence number: "))) (setq n1 1) ) (if (not (setq zn (getint "\nPlease enter the increasing or decreasing ordinal number: "))) (setq zn 1) ) (if (not (setq h1 (getreal "\nPlease specify the text height: "))) (setq h1 50) ) (setq sxh1 (strcat qz (itoa n1) hz)) (setq p1 (getpoint "\nPlease specify the insertion point: ")) (while (/= p1 nil) (setq p1 (vlax-3d-point p1)) (setq txt (vla-addtext ms sxh1 p1 h1 ) ) (setq n1 (+ n1 zn) sxh1 (strcat qz (itoa n1) hz) p1 (getpoint "\nPlease specify the next insertion point: ") ) ) (setvar "cmdecho" oce1) (vlax-release-object ms) (princ) )

Submit a Project

**Looking for Chemical Technology, Equipment & Solutions?** No Registration Required Broader Platform Exposure | Global Chemical Service Provider Connections

Submit Request — Free Consultation

Disclaimer

This is an automated machine translation of the original thread. Some technical terms may have inaccuracies; the original text shall prevail. Click "View Original" at the top right to access the source page, which supports IP-based automatic real-time language translation. Please watch out for contact details and sales inducements to prevent fraud. All content and translations are for reference only, representing solely the poster's personal views. For enquiries, email service@hcbbs.com.