Jump to content

align block with text


pmadhwal7

Recommended Posts

You get no help then need to do it by yourself.

 

suggestion: in Layout (paper space) make sure layout name is numerical.

1. Insert your arrow block eg: layout 01

2. make 2 field objects 

command: FIELD

in Field category -> All -> Formula 

copy this expression 

Quote

 


 

%<\AcVar ctab>%-1

%<\AcVar ctab>%+1

 
 

 

to formula space

field.png.75419f0730c424786f5c1cdbc29361a5.png

 

3. evaluate and insert 'field-text' in layout

4. manually align 'field text' with the arrow block

5. Select aligned arrows blocks & texts, Copy <Crtl^C>  then paste to others layout eg: 02, 03, 04 etc..

   the 'sheet No: ###' it will be updated automatically according to layout name

 

 

 

 

Edited by hanhphuc
Link to comment
Share on other sites

On 1/5/2020 at 2:38 PM, hanhphuc said:

You get no help then need to do it by yourself.

 

suggestion: in Layout (paper space) make sure layout name is numerical.

1. Insert your arrow block eg: layout 01

2. make 2 field objects 

command: FIELD

in Field category -> All -> Formula 

copy this expression 

to formula space

field.png.75419f0730c424786f5c1cdbc29361a5.png

 

3. evaluate and insert 'field-text' in layout

4. manually align 'field text' with the arrow block

5. Select aligned arrows blocks & texts, Copy <Crtl^C>  then paste to others layout eg: 02, 03, 04 etc..

   the 'sheet No: ###' it will be updated automatically according to layout name

 

 

 

 

sir i tried this method but not able to use can u create a video for me

Link to comment
Share on other sites

 

well, i think field-attributed block is better than align MTEXT as mentioned in my previous post

 

3 hours ago, pmadhwal7 said:

sir i tried this method but not able to use can u create a video for me

 

$0.02 making a drawing faster than making a video !!

 

download this example 

 

sheet no.dwg

 

 In layout 01 you will see this 2 blocks 

Sheet No: 00            Sheet No: 02

<----------             ---------->

 

simply copy both blocks from layout 01 & paste it to other layout 02, 03, etc.. 

command: regen

 

 

 

 

  • Like 1
Link to comment
Share on other sites

On 1/7/2020 at 6:54 PM, hanhphuc said:

 

well, i think field-attributed block is better than align MTEXT as mentioned in my previous post

 

 

$0.02 making a drawing faster than making a video !!

 

download this example 

 

sheet no.dwg 348.13 kB · 2 downloads

 

 In layout 01 you will see this 2 blocks 


Sheet No: 00            Sheet No: 02

<----------             ---------->

not working on model space

 

 

On 1/7/2020 at 6:54 PM, hanhphuc said:

simply copy both blocks from layout 01 & paste it to other layout 02, 03, etc.. 

command: regen

 

 

 

 

 

Link to comment
Share on other sites

  

On 1/5/2020 at 10:08 AM, hanhphuc said:

make sure layout name is numerical

 

On 1/11/2020 at 5:08 AM, pmadhwal7 said:

not working on model space

 

Edited by Roy_043
  • Thanks 1
Link to comment
Share on other sites

In a different way model is numeric if you look at taborder Model is always 0.

 

Same as you can have layouts with any name and number suffix but sheet number will be correct using taborder value ie the order you have arranged them in. 

 

Recent post.

 

(setq doc (vla-get-activedocument (vlax-get-acad-object)))
(setq x '())
(vlax-for lay (vla-get-Layouts doc)
(setq x  (cons (strcat (vla-get-name lay) " " (rtos (vla-get-taborder lay) 2 0)) x))
)

("Model 0" "Layout2 2" "Layout1 1")

Edited by BIGAL
Link to comment
Share on other sites

15 hours ago, pmadhwal7 said:

please check my sample dwg

sample arrow.dwg 121.63 kB · 2 downloads

 

if you insist using in model space, then my previous solution won't work!

stop making things complicated,

1. either use 'sheet no.dwg' as templete (copy 'arrow.dwg' then pasteorig to 'sheet no.dwg 'model )or..

2. copy field-attributed-arrow from 'sheet no.dwg' to you 'sample arrow.dwg's LAYOUT / paper space NOTin Model space!!!

3. try learing your own arrow LISP routine which satisfying your requirement :)

 

Link to comment
Share on other sites

6 minutes ago, hanhphuc said:

 

if you insist using in model space, then my previous solution won't work!

stop making things complicated,

1. either use 'sheet no.dwg' as templete (copy 'arrow.dwg' then pasteorig to 'sheet no.dwg 'model )or..

2. copy field-attributed-arrow from 'sheet no.dwg' to you 'sample arrow.dwg's LAYOUT / paper space NOTin Model space!!!

3. try learing your own arrow LISP routine which satisfying your requirement :)

 

actually sir it should shown in model space like my arrow and sheet number but when i am working with ur method sheet number is not showing that's y i also attached my lsp which only give me sheet number not arrow and rotating arrow and arranging them taking lots of time

Link to comment
Share on other sites

8 hours ago, BIGAL said:

In a different way model is numeric if you look at taborder Model is always 0.

 

Same as you can have layouts with any name and number suffix but sheet number will be correct using taborder value ie the order you have arranged them in. 

 

Recent post.

 


(setq doc (vla-get-activedocument (vlax-get-acad-object)))
(setq x '())
(vlax-for lay (vla-get-Layouts doc)
(setq x  (cons (strcat (vla-get-name lay) " " (rtos (vla-get-taborder lay) 2 0)) x))
)

("Model 0" "Layout2 2" "Layout1 1")

sir...can u explain it how to use this?

Link to comment
Share on other sites

Redid it to make more useable the list produced is the layout name and the order number of the layout

 

(setq doc (vla-get-activedocument (vlax-get-acad-object)))
(setq lst '())
(vlax-for lay (vla-get-Layouts doc)
(setq lst  (cons (list (vla-get-name lay) (vla-get-taborder lay)) lst))
)

(("Model" 0) ("Layout2" 2) ("Layout1" 1)) just use nth etc of a list

Edited by BIGAL
  • Confused 1
Link to comment
Share on other sites

@BIGAL

FWIW you don't need to create an empty list when using CONS.

(setq doc (vla-get-activedocument (vlax-get-acad-object)))
(setq lst '())
(vlax-for lay (vla-get-Layouts doc)
(setq lst  (cons (list (vla-get-name lay) (vla-get-taborder lay)) lst))
)
Edited by ronjonp
  • Confused 1
Link to comment
Share on other sites

Ronjonp your right, just a habit making sure have not used elsewhere or in a repeat etc. Some one else's code may have used lst, ss is pretty common for selection set as an example.

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