Jump to content

Edit Lisp to create viewport from the model sidebar


Phamyen

Recommended Posts

The selection box is not arranged in any order you can choose by pline or text (ordinal number) in Figure 1

h1.thumb.jpg.7347f51fc13ab44bba902cd63837ce98.jpg
b1: type command
b2: scan by pline or text
b3: select the print rate (500,1000,2000,5000 ..)
b4: select a frame (if any)
b5: enter the space between the layout side frames
- If you have arranged in order, then automatically numbered (or pline ...) Figure 2

  code :

(defun C:mtll()
 (command "UNDO" "BE")
 (setvar "OSMODE" 0)
 (setq taphop(ssget))
 (if (= Tyle nil)
(setq Tyle1 1)
(setq Tyle1 Tyle))
 (setq Tyle (getreal (strcat "\n Ty le: <" (rtos Tyle1 2 0) "> ")))
 (if (= Tyle nil)
(setq Tyle Tyle1))
 (setq soluong (sslength taphop))
 (setq index 0)
 (setq i 0)
 (setq ten (getstring "\n Nhap ten layout:"))
 (command "layout" "N" ten)
 (command "LAYOUT" "S" ten)
 (command "ERASE" "ALL" "")
 (command "MODEL")
 (setq X 0)
 (command "ZOOM" "E")
 (while (< index soluong)
(setq i(1+ i))
(setq khung(ssname taphop index))
(setq lst(acet-geom-vertex-list khung))
(command "COPYCLIP" khung "")
(command "LAYOUT" "S" ten)
(command "PASTECLIP" (list X 0))
(command "SCALE" (entlast) "" (list X 0) (/ 1 tyle))
(command "MVIEW" "O" (entlast))
(command "MSPACE")
(command "ZOOM" (nth 0 lst) (nth 2 lst))
(command "PSPACE")
(setq X(+ X 300.5607 (/ (abs(- (car (nth 2 lst)) (car (nth 0 lst)))) tyle)))
(command "ZOOM" "W" (list 0 0) (list (+ X 100) 0))
(setq index (+ index 1))
)
 (command "MODEL")
 (command "UNDO" "END")
 (setvar "OSMODE" 15359)
 (princ)
 )

 

(I can't speak English to use google translate
Sorry if bothered)

h2.thumb.jpg.62e00c629ddd947f5f859cdaba9028df.jpg

aaa.dwg

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...