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

Multiple Replication

2008-02-26View Original

Thread Content

(defun C:FXC () (setq A nil) (setq OM (getvar "OSMODE")) (setvar "OSMODE" 33) (setq PNT1 (getpoint "\nStart point of direction: ")) (setq PNT2 (getpoint "\nEnd point of direction: " PNT1))(terpri) (initget 1 "M E N") (prompt "\nSelect copying method: ") (setq CTYPE (getkword " : ")) (if (= CTYPE "M") (setq SP (getdist "\nMaximum object spacing: "))) (if (= CTYPE "E") (setq SP (getdist "\nPrecise object spacing: "))) (if (= CTYPE "N") (setq SP (getreal "\nNumber of objects: "))) (setq DIST (distance PNT1 PNT2)) (setq ANG (angle PNT1 PNT2)) (setq TEMP1 (/ DIST SP)) (setq TEMP2 (fix (/ DIST SP))) (setq INC1 SP) (setq INC2 (/ DIST (+ 1 (fix (/ DIST SP))))) (setq INC3 (/ DIST (- SP 1))) (if (= TEMP1 TEMP2) (setq INC INC1) (setq INC INC2)) (if (= CTYPE "E") (setq INC INC1) (setq INC INC)) (if (= CTYPE "N") (setq INC INC3) (setq INC INC)) (setq TMS (FIX (+ 0.00001 (/ DIST INC)))) (setvar "OSMODE" 0) (setq A (ssget)) (setq INCR 0) (repeat TMS (setq INCR (+ INCR INC)) (setq NEWPT (polar PNT1 ANG INCR)) (command "copy" A "" PNT1 NEWPT) ) (setvar "OSMODE" OM) (setq A nil) )

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.