• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Visual LISP, AutoLISP and General Customization

    Reply
    *Expert Elite*
    Posts: 836
    Registered: ‎08-16-2007

    Re: setting DIMLFAC

    03-31-2012 05:52 AM in reply to: knlooi

    Knooli,

     

    I would encourage you to avoid techniques to manipulate dimlfac based on scale factors.  Such techniques are simply not needed. (AutoCAD user for more than 25 years).

     

    Best practice is to work on object full size and dimension them in the same space they are drawn in IMO.  If I need to have multiple scales on a single sheet, I typically work with each scale in its own drawing file and xattach the separate files into a sheet file.  Others would use several annotation scales within a single model space and use paper space for scaling the plots.

     

    Another technique is to wrap the objects inside block and use bedit.  Problem with that is that bedit always resets the drawing scale to 1:1 which is annoying.

     

    Others use viewports for scaling and dimension in paper space of the sheet they are plotting.

     

    I prefer not to work behind others who have scaled object in model space so that dimensions and the distance command can no longer measure them.  To add information or to edit such a drawing requires checking the properties of the dimensions, finding dimlfac, scaling the objects back to full size, and then re-scaling them.

     

    Good luck.

    Please use plain text.
    Contributor
    knlooi
    Posts: 15
    Registered: ‎04-14-2011

    Re: setting DIMLFAC

    04-01-2012 10:10 PM in reply to: dbroad

    Thanks for your reply

     

    Kent& dbroad,

    I don't understand how to use paper space. Normally, our full drawing have more then hundred objects, difference size of each object. If I set the viewing scale, all the pages size cannot make it standardize to keeping softcopy and hardcopy. Actually, I need to make like Inventor “Detail” command, can be scale up and scale down object, but dimension same as original object.

     

    Pbejse,

    Yes, I missed the data lisp.

    The data lisp is use to call tooling_info.lsp, this lisp is using in other software and not is autolisp.

    Attached dwg file included data information, when running tcmr.lsp will skip the data lisp.

    Please use plain text.
    *Expert Elite*
    Posts: 2,057
    Registered: ‎11-24-2009

    Re: setting DIMLFAC

    04-01-2012 11:58 PM in reply to: knlooi

    knlooi wrote:

    Thanks for your reply

      

    Pbejse,

    Yes, I missed the data lisp.

    The data lisp is use to call tooling_info.lsp, this lisp is using in other software and not is autolisp.

    Attached dwg file included data information, when running tcmr.lsp will skip the data lisp.


    **** Try the lisp routine now*****

    I commented that part where i the modifed the code [see attached]
    ;;; <-------

    I totally agree with kent and dbroad regarding scaling the drawing and using paperpsapce though
    But since you already had it setup the way you had might as well help you out a little.

    Cheers

     

    BTW:

    Take out coment tag  where you  load the data.lsp, I left it there while testing your code

     

    HTH

     

    Please use plain text.
    *Expert Elite*
    Posts: 2,057
    Registered: ‎11-24-2009

    Re: setting DIMLFAC

    04-02-2012 12:22 AM in reply to: pbejse

    As i was watching the video you posted, you mentioned there that you want the DIMLFAC value to maintain the

    value of 1

     

    So

    .....

    (progn (setvar 'Dimlfac (* 1.22222 scale1))
                           (command "_-dimstyle" "_apply" obj "")
                          (setvar 'Dimlfac 1);<----- here
                           )

    ......

     or here

    (setvar "osmode" oosm)

    (setvar 'Dimlfac 1);<----- or here

      ) (alert "User Cancel!")

    .....

     

     

    HTH

     

    Please use plain text.
    Contributor
    knlooi
    Posts: 15
    Registered: ‎04-14-2011

    Re: setting DIMLFAC

    04-02-2012 01:00 AM in reply to: pbejse

    Pbejse,

    Thank you very much, the lisp work is very good now.

    One more question need your help is the dimension missing dia. and tolerance, can use the lisp to set it back?

    Please use plain text.
    *Expert Elite*
    Posts: 2,057
    Registered: ‎11-24-2009

    Re: setting DIMLFAC

    04-02-2012 01:17 AM in reply to: knlooi

    knlooi wrote:

    Pbejse,

    Thank you very much, the lisp work is very good now.

    One more question need your help is the dimension missing dia. and tolerance, can use the lisp to set it back?


    Oh that... Sure it can be done

    Questions:

    What other dimension properties beside Tolerance do you usually override?

    Theres a long list for such, so  i need to reduce the number to a few selected properties

     

    Answer those Q's then  I'll iupdate the code and get back to you

     

     

     

     


     

    Please use plain text.
    *Expert Elite*
    Posts: 2,057
    Registered: ‎11-24-2009

    Re: setting DIMLFAC

    04-02-2012 01:53 AM in reply to: pbejse

    Easiest solution is to repalce all this

    (progn (setvar 'Dimlfac (* 1.22222 scale1))
                           (command "_-dimstyle" "_apply" obj "")
                           (setvar 'Dimlfac 1)
                           )

     

    to this

    (command "_dimoverride" "DIMLFAC" (* 1.22222 scale1) "" obj "")

     

    Try it.

    Please use plain text.
    Contributor
    knlooi
    Posts: 15
    Registered: ‎04-14-2011

    Re: setting DIMLFAC

    04-02-2012 02:20 AM in reply to: pbejse

    Pbejse,

    Thanks your help!

     

    Is symmetrical and deviation.

    Please use plain text.
    *Expert Elite*
    Posts: 2,057
    Registered: ‎11-24-2009

    Re: setting DIMLFAC

    04-02-2012 03:13 AM in reply to: knlooi

    knlooi wrote:

    Pbejse,

    Thanks your help!

     


    Glad I could help.

     

    There's still a lot of improvement that can be done on your lisp code. Did you wirte this one yourself?  

    Code after code you will understand  and learn what works and what doesnt.

     

    Keep on coding knlooi

     

    Cheers :smileyhappy:

     

    Please use plain text.
    Contributor
    knlooi
    Posts: 15
    Registered: ‎04-14-2011

    Re: setting DIMLFAC

    04-02-2012 03:43 AM in reply to: pbejse

    Ok, I try to write this lisp. Thanks again.

    Please use plain text.