Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

lisp routine needed

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
205 Views, 3 Replies

lisp routine needed

Just wondering is there a lisp routine to do this:

eg: I created a dim style call '50xp' & values of settings are in relation
or proportion to a scale drawing of 1:50.
So when I used a scale 1/50xp in my drawing, the lisp routine can
automatically changed the dimstyle to my customised '50xp' dim style (which
all the values are meant for this scale of 1:50)
This routine should also work with other scale factors.

Any help is appreciated.

Thanks,

danny
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: Anonymous

why?? just use paperspace and set in your dimstyles to use paperspace scale
for all dimensions

danny wrote in article
<42E20342BC4BEDA82A9FB25D881BCC35@in.WebX.maYIadrTaRb>...
> Just wondering is there a lisp routine to do this:
>
> eg: I created a dim style call '50xp' & values of settings are in
relation
> or proportion to a scale drawing of 1:50.
> So when I used a scale 1/50xp in my drawing, the lisp routine can
> automatically changed the dimstyle to my customised '50xp' dim style
(which
> all the values are meant for this scale of 1:50)
> This routine should also work with other scale factors.
>
> Any help is appreciated.
>
> Thanks,
>
> danny
>
>
>
>
>
Message 3 of 4
Anonymous
in reply to: Anonymous

You don't need to create a dimstyle for a strict drawing scale. Set up the
dimstyle so that it works at 1:1, then use the DIMSCALE variable to scale
the dimensions to whatever you need.

Here is a routine that will zoom the viewport to whatever the dimscale is...

;;short routine for zooming to the dimscale
(defun c:zsd (/ scl vpl)
(setq scl (strcat "1/" (rtos (getvar "dimscale") 2 0) "xp"))
(command "ZOOM" scl)
(princ (strcat "\nZoomed to " (rtos (getvar "dimscale") 2 0) " scale."))
(princ)
)

--
Ben Maki
NDC Inc.


"danny" wrote in message
news:42E20342BC4BEDA82A9FB25D881BCC35@in.WebX.maYIadrTaRb...
> Just wondering is there a lisp routine to do this:
>
> eg: I created a dim style call '50xp' & values of settings are in relation
> or proportion to a scale drawing of 1:50.
> So when I used a scale 1/50xp in my drawing, the lisp routine can
> automatically changed the dimstyle to my customised '50xp' dim style
(which
> all the values are meant for this scale of 1:50)
> This routine should also work with other scale factors.
>
> Any help is appreciated.
>
> Thanks,
>
> danny
>
>
>
>
Message 4 of 4
Anonymous
in reply to: Anonymous

Thanks to both of you. After doing this for so many years,
I'm just like a frog in the well, I should have gone into a discussion group
sooner.

danny

"Ben Maki" wrote in message
news:1E3EA2812101C0C8A3E9C173196387FD@in.WebX.maYIadrTaRb...
> You don't need to create a dimstyle for a strict drawing scale. Set up
the
> dimstyle so that it works at 1:1, then use the DIMSCALE variable to scale
> the dimensions to whatever you need.
>
> Here is a routine that will zoom the viewport to whatever the dimscale
is...
>
> ;;short routine for zooming to the dimscale
> (defun c:zsd (/ scl vpl)
> (setq scl (strcat "1/" (rtos (getvar "dimscale") 2 0) "xp"))
> (command "ZOOM" scl)
> (princ (strcat "\nZoomed to " (rtos (getvar "dimscale") 2 0) " scale."))
> (princ)
> )
>
> --
> Ben Maki
> NDC Inc.
>
>
> "danny" wrote in message
> news:42E20342BC4BEDA82A9FB25D881BCC35@in.WebX.maYIadrTaRb...
> > Just wondering is there a lisp routine to do this:
> >
> > eg: I created a dim style call '50xp' & values of settings are in
relation
> > or proportion to a scale drawing of 1:50.
> > So when I used a scale 1/50xp in my drawing, the lisp routine can
> > automatically changed the dimstyle to my customised '50xp' dim style
> (which
> > all the values are meant for this scale of 1:50)
> > This routine should also work with other scale factors.
> >
> > Any help is appreciated.
> >
> > Thanks,
> >
> > danny
> >
> >
> >
> >
>
>

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Autodesk Design & Make Report