Jump to content

Match Line Refer Dwg. No.?


RRS1987

Recommended Posts

Dear All,

I am working with one Landscape drawing, In this Dwg I splited that hole area as 128 sheets.

Now I have to set view port for every sheets (128 nos.) . The problem is, I have to mention that surrounding sheet numbers for the specific sheet, which showing in the view port.

What should i do to change the surrounding sheet numbers as automatically?

Please find that attached pdf file.

Please could someone help to me.

thanks.

MATCH LINE REFER DWG NO..pdf

Link to comment
Share on other sites

You can create your 128 layouts and albel the edge connecting layout pretty simple using a lisp with a double loop.

 

You create two loops one inside the other say 12x12 outer loop repeat 12 inner loop repeat 12 also this gives 144 answers.

 

Search here for GRID labelling as a start these all use a double loop

 

(repeat 12
(repeat 12
(do 1st line x)
(setq x (+ 1 x))
)
(do 2nd line y)
(setq y (+ 1 y))
)
)

Link to comment
Share on other sites

When we've had to do sheet labeling such as that it has always been done manually, although there's also a lot less than 128 sheets normally. I'm interested to see how this could be achieved automatically also.

Link to comment
Share on other sites

Dear Mr. Bigal,

sorry , Actually i couldn't able to get ur point? because i am not familiar in autocad.

Please can u describe to me, how to prepare double loops? and where i have to create those loops (means model space or layout) ?

And also if there is any lisp, please can you provide me?

I am waiting for your valuable assistance.

Dear Mr.Murph_map

Actually i dont know 3D autocad. I am working with 2D drawing only . please could u help to me ?

RRS1987

Link to comment
Share on other sites

The double loops are part of coding a Lisp program.

 

Just a suggestion of the method

1 pick lower left corner and window complete area

2 enter scale of plots.....calculate rows and colums based on picked area and scale required

3 inside lisp now calculate first centroid of a layout

4 create new layout tab

5 jump into model space zoom C centroid then scale XP

6 increase centroid x,y

7 jump to 4 again till done

 

whats the size of your modelspace drawing length & height ft or metric what plot scale if I get a chance I may be able to do something.

Link to comment
Share on other sites

MATCH LINE REFER.DWGDear Mr.Bigal,

Please forgive me. I was failed to understand and use your tips for double loops.

Still I am not able to create double loops in autocad.

Herewith I am attached one dwg, which i am trying to make double loops.

Please find attached the drawing. I request you, If you have time, can u do something as favorably for me in this case.

Your concern must be appreciated,

I would be grateful to you.

 

RRS1987

Link to comment
Share on other sites

Had a look at your dwg pretty sure can be done have to find time not hard to do so not sure when.

 

The layout I would provide would only do a rectang of panels so in your case would run program 3 times or else do once and delete unwanted, will have a think about it.

 

a start others jump in

 

; lisp to create layout tabs over an area given panel size and plot scale
; by AjH BIGAL 2012
(defun topleft ()
(setq pt1 (getpoint "\npick top left corner:<"))
(setq pt2 (getpoint "\npick right side:<"))

(setq topx (car pt1))
(prompt "\nReplace X value ? <Cr> ok :<")
   (prin1 topx)
   (prompt ">:")
   (setq newval (getreal)
   (if (= newval nil)
     (prin1 topx)
     (setq topx newval)
)
(setq topy (cadr pt1))
(prompt "\nReplace Y value ? <Cr> ok :<")
   (prin1 topy)
   (prompt ">:")
   (setq newval (getreal)
   (if (= newval nil)
     (princ topyx)
     (setq topy newval)
)

(setq pt1 (list topx topy)) ;reset pt1 

(setq rowdist (distance pt1 pt2))
(if (= horiz nil)
   (progn (setq horiz 300)
   (prompt "\nEnter Horizontal grid width:<")
   (prin1 horiz)
   (prompt ">:")
   (setq newhoriz (getreal)
   (if (= newhoriz nil)
     (setq horiz horiz)
     (setq horiz newhoriz)
   )
   )
)
(if (= vert nil)
   (progn (setq vert 250)
   (prompt "\nEnter Vertical grid height:<")
   (prin1 vert)
   (prompt ">:")
   (setq newvert (getreal))
   (if (= newvert nil)
     (setq vert vert)
     (setq vert newvert)
   )
   )
)
(setq numcol (fix (/ rowdist newhoriz))) ;number of grids
(prompt "\nHorizontal grids to be created:<")
   (prin1 numcol) 
(defun layouts ()
 (setq cenx (+ topx (/ horiz 2.0)))
 (setq ceny (- topy (/ vert 2.0)))
 (setq cenpt (list cenx ceny))
 (command "layout" "n" layoutname)
 (command "mview" "0,0" "300,300") ; this needs to be changed to allow for scale
 (command "mspace") 
 (command "zoom" "c" cenpt "10xp")
) ; end defun

;program actually starts here

(setq layoutname 1) ; use number  for now later change to better 0001 etc
(topleft)
(repeat 10
(layouts)
(setq cenx (+ cenx horiz))
(setq cenpt (list cenx ceny))
(setq name (+ layoutname 1))
) ; end repeat

 

Sorry got to go again watch this space

Edited by BIGAL
code updated but not tested
Link to comment
Share on other sites

Dear Mr.Bigal,

still i couldn't get any result.

I could load that lisp successfully. And then I typed Topleft as a command in the command prompt. but that doesn't work.

Please can you check once again that lisp for me.

 

Thanks once again.

 

RRS1987

Link to comment
Share on other sites

Dear Mr.19cruthik68,

yes.

Some code details has been posted by Mr.bigal to make double loops as per my requirement.

I don't know how to use code, which posted by Mr.bigal ( i.e see reply#8 )

 

RRS1987

Link to comment
Share on other sites

a start others jump in

 

Guys, the code is not complete, of course it is not going to work yet. Bigal was just giving a starting point (hints) of how someone could go about it.

Link to comment
Share on other sites

This is the basis of what you want it will create layout tabs

 

But ! I stop here

 

Theres lots of examples here for all the extra stuff title blocks, abutting dwg labels etc but Cadtutor is not a write programs for free rather help and advise.

 

; lisp to create layout tabs over an area given panel size and plot scale
; by AjH BIGAL 2012
(defun topleft ()
(setq pt1 (getpoint "\npick top left corner:<"))
(setq pt2 (getpoint "\npick right side:<"))

(setq topx (car pt1))
(prompt "\nReplace X value ? <Cr> ok :<")
   (prin1 topx)
   (prompt ">:")
   (setq newval (getreal))
   (if (= newval nil)
     (prin1 topx)
     (setq topx newval)
)
(setq topy (cadr pt1))
(prompt "\nReplace Y value ? <Cr> ok :<")
   (prin1 topy)
   (prompt ">:")
   (setq newval (getreal))
   (if (= newval nil)
     (princ topyx)
     (setq topy newval)
)

(setq pt1 (list topx topy)) ;reset pt1 
(setq rowdist (distance pt1 pt2))
(if (= horiz nil)
   (progn (setq horiz 300)
   (prompt "\nEnter Horizontal grid width:<")
   (prin1 horiz)
   (prompt ">:")
   (setq newhoriz (getreal))
   (if (= newhoriz nil)
     (setq horiz horiz)
     (setq horiz newhoriz)
   )
   )
)
(if (= vert nil)
   (progn (setq vert 250)
   (prompt "\nEnter Vertical grid height:<")
   (prin1 vert)
   (prompt ">:")
   (setq newvert (getreal))
   (if (= newvert nil)
     (setq vert vert)
     (setq vert newvert)
   )
   )
)
(setq numcol (fix (/ rowdist horiz))) ;number of grids
(prompt "\nHorizontal grids to be created:<")
 (princ numcol) 
)
(defun layouts ()
 (command "layout" "n" layoutname)
 (setvar "ctab" layoutname)
 (command "mview" "0,0" "300,300") ; this needs to be changed to allow for scale
 (command "mspace") 
 (command "zoom" "c" cenpt "1xp") ; it is set to 1xp needs to reflect scale required
 (command "pspace" )
) ; end defun

;program actually starts here

(setq numlayouts 1) ; use number  for now later change to better 0001 etc
(setq layoutname (rtos numlayouts 2 0))

(topleft)
(setq cenx (+ topx (/ horiz 2.0)))
(setq ceny (- topy (/ vert 2.0)))
(setq cenpt (list cenx ceny))
(repeat numcol
(layouts)
(setq cenx (+ cenx horiz))
(setq cenpt (list cenx ceny))
(setq numlayouts (+ numlayouts 1))
(setq layoutname (rtos numlayouts 2 0))
(princ layoutname)
) ; end repeat

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...