Author Topic: autolisp dim  (Read 2790 times)

0 Members and 1 Guest are viewing this topic.

AUTOKAD

  • Guest
autolisp dim
« on: February 27, 2008, 10:59:14 AM »
Hello everybody,

I'm just wandering if somebody could help me. I dont know how to make an autolisp, but I know somebody has done this before.

I open up autocad (new), and I go to my dimension style manager to set up my dimension, so I have to go through all these tabs. Is there a way or am autolisp that wont go through these process. I'm thinking of creating an icon...named 1" and once you click it youre on your 1" dimension style (text, leaders, everything is set up). It would be nice to have one.

I know I could just copy and paste an existing dimension to a new drawing or 'design centre'. or 'pallets'..but I would prefer to do it this way to make it also as my standard

Thank you Sirs

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: autolisp dim
« Reply #1 on: February 27, 2008, 11:11:21 AM »
There are threads on that here.
But basically create a blank DWG file with your Dim's defined in it.
You then INSERT it & then delete the INSERT. The result is that the Dim's are in your new DWG.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

AUTOKAD

  • Guest
Re: autolisp dim
« Reply #2 on: February 27, 2008, 11:21:15 AM »
Thanks CAB
Yes I can do that. But instead of inserting it, is there a way to create
a customized icon, like I mentioned earlier.
Thank you

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: autolisp dim
« Reply #3 on: February 27, 2008, 11:32:32 AM »
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: autolisp dim
« Reply #4 on: February 27, 2008, 11:33:29 AM »
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: autolisp dim
« Reply #5 on: February 27, 2008, 11:43:08 AM »
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Birdy

  • Guest
Re: autolisp dim
« Reply #6 on: February 27, 2008, 12:26:41 PM »
And this
http://www.theswamp.org/index.php?topic=4299.0
It's pops a dialog that sets Layer, Dimstyle, and Textstyle given an archicteural scale.  You'd have to modify the code to suit your standards, but it's worked well for us for quite a while.

We've since modified our PGP file to do it via keyboard.
Type: s1
it runs:
Code: [Select]
;;;SCALE: 1"=1'-0"
;;;DIMSTYLE=D1 LAYER=DIMENSIONS TEXTSTYLE=T11)
(DEFUN C:s1 ()
  (command "-dimstyle" "Restore" "D1" "")
  (command "-LAYER" "Set" "DIMENSIONS" "")
  (command "-style" "T11" "" "" "" "" "" "" "")
  (PRINC)
  )
Modify the dimstyle, layer, and text style to suit your needs.

The complete code for OUR scales is:
Code: [Select]
;;;-------------------------------------------
;;;  <KEYSCALE.LSP>
;;;  Copyright 2007
;;;  Author; J. Harcus
;;;  Created: <FEB. 2007>
;;;  Modified: <>
;;;-------------------------------------------
;;;  Works similar to setscale.lsp, but without the dialog box.
;;;  Allows user to set layer, dimstyle, and textstyle from the keyboard.
;;;  add autoloader to acaddoc.lsp file:
;;;  (autoload "KEYSCALE" '("sF" "HS" "s3" "s15" "s1" "s34" "s12" "s38" "s14"))


;;;SCALE: FULL
;;;DIMSTYLE=DFULL LAYER=DFULL TEXTSTYLE=TF1)
(DEFUN C:sF ()
  (command "-dimstyle" "Restore" "DFULL" "")
  (command "-LAYER" "Set" "DFULL" "")
  (command "-style" "TF1" "" "" "" "" "" "" "")
  (PRINC)
  )
;;;SCALE: HALF SCALE
;;;DIMSTYLE=DHALF LAYER=DFULL TEXTSTYLE=TH1)
(DEFUN C:HS ()
  (command "-dimstyle" "Restore" "DHALF" "")
  (command "-LAYER" "Set" "DFULL" "")
  (command "-style" "TH1" "" "" "" "" "" "" "")
  (PRINC)
  )
;;;SCALE: 3"=1'-0"
;;;DIMSTYLE=D3 LAYER=D3 TEXTSTYLE=T31)
(DEFUN C:s3 ()
  (command "-dimstyle" "Restore" "D3" "")
  (command "-LAYER" "Set" "D3" "")
  (command "-style" "T31" "" "" "" "" "" "" "")
  (PRINC)
  )
;;;SCALE: 1-1/2"=1'-0"
;;;DIMSTYLE=D15 LAYER=DIMENSIONS TEXTSTYLE=T151)
(DEFUN C:s15 ()
  (command "-dimstyle" "Restore" "D15" "")
  (command "-LAYER" "Set" "DIMENSIONS" "")
  (command "-style" "T151" "" "" "" "" "" "" "")
  (PRINC)
    )
;;;SCALE: 1"=1'-0"
;;;DIMSTYLE=D1 LAYER=DIMENSIONS TEXTSTYLE=T11)
(DEFUN C:s1 ()
  (command "-dimstyle" "Restore" "D1" "")
  (command "-LAYER" "Set" "DIMENSIONS" "")
  (command "-style" "T11" "" "" "" "" "" "" "")
  (PRINC)
  )
;;;SCALE: 3/4"=1'-0"
;;;DIMSTYLE=D34 LAYER=DIMENSIONS TEXTSTYLE=T341)
(DEFUN C:s34 ()
  (command "-dimstyle" "Restore" "D34" "")
  (command "-LAYER" "Set" "DIMENSIONS" "")
  (command "-style" "T341" "" "" "" "" "" "" "")
  (PRINC)
  )
;;;SCALE: 1/2"=1'-0"
;;;DIMSTYLE=D12 LAYER=DIMENSIONS TEXTSTYLE=T121)
(DEFUN C:s12 ()
  (command "-dimstyle" "Restore" "D12" "")
  (command "-LAYER" "Set" "DIMENSIONS" "")
  (command "-style" "T121" "" "" "" "" "" "" "")
  (PRINC)
  )
;;;SCALE: 3/8"=1'-0"
;;;DIMSTYLE=D38 LAYER=DIMENSIONS TEXTSTYLE=T121)
(DEFUN C:s38 ()
  (command "-dimstyle" "Restore" "D38" "")
  (command "-LAYER" "Set" "DIMENSIONS" "")
  (command "-style" "T381" "" "" "" "" "" "" "")
  (PRINC)
  )
;;;SCALE: 1/4"=1'-0"
;;;DIMSTYLE=D14 LAYER=DIMENSIONS TEXTSTYLE=T141)
(DEFUN C:s14 ()
  (command "-dimstyle" "Restore" "D14" "")
  (command "-LAYER" "Set" "DIMENSIONS" "")
  (command "-style" "T141" "" "" "" "" "" "" "")
  (PRINC)
  )

AUTOKAD

  • Guest
Re: autolisp dim
« Reply #7 on: February 27, 2008, 02:12:00 PM »
Thanks everyone..I'll check it out, this is great