pmadhwal7 Posted January 3, 2020 Posted January 3, 2020 is possible to align block(reference file attached) with text or polyline or i have n lsp which place sheet number text as i want so is is possible also place arrow with those text, both dwg and lsp i attached here, Drawing2.dwg Sheet Numbring.lsp Quote
hanhphuc Posted January 5, 2020 Posted January 5, 2020 (edited) 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 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 January 5, 2020 by hanhphuc Quote
pmadhwal7 Posted January 7, 2020 Author Posted January 7, 2020 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 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 Quote
hanhphuc Posted January 7, 2020 Posted January 7, 2020 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 1 Quote
pmadhwal7 Posted January 11, 2020 Author Posted January 11, 2020 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 Quote
Roy_043 Posted January 12, 2020 Posted January 12, 2020 (edited) 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 January 12, 2020 by Roy_043 1 Quote
pmadhwal7 Posted January 12, 2020 Author Posted January 12, 2020 please check my sample dwg sample arrow.dwg Quote
Roy_043 Posted January 12, 2020 Posted January 12, 2020 The provided solution will only work for layouts that have a 'numerical' name. 'Model' is NOT numerical. Quote
BIGAL Posted January 13, 2020 Posted January 13, 2020 (edited) 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 January 13, 2020 by BIGAL Quote
hanhphuc Posted January 13, 2020 Posted January 13, 2020 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 Quote
pmadhwal7 Posted January 13, 2020 Author Posted January 13, 2020 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 Quote
pmadhwal7 Posted January 13, 2020 Author Posted January 13, 2020 sir i have lsp which align text with polyline is it possible that it works on arrow or block too?? attachment available u can check tr.lsp Quote
pmadhwal7 Posted January 13, 2020 Author Posted January 13, 2020 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? Quote
BIGAL Posted January 14, 2020 Posted January 14, 2020 (edited) 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 January 14, 2020 by BIGAL 1 Quote
ronjonp Posted January 14, 2020 Posted January 14, 2020 (edited) @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 January 15, 2020 by ronjonp 1 Quote
BIGAL Posted January 14, 2020 Posted January 14, 2020 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. Quote
Recommended Posts
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.