Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
Contributor
dkeyser
Posts: 16
Registered: ‎01-05-2006
Message 1 of 7 (1,681 Views)

Continuous dimension lisp that alternate the dimension position

1681 Views, 6 Replies
07-12-2012 07:44 AM

Is there a lisp that will allow me to do a continuous dimension, but will alternate the dimension position from low, high, low and high?  If there is no lisp already created, can someone help me to create one? 

 

See Continuous dimension attachment for example.

 

I work at a glass and glazing company and this is how we dimension mullion width and DLO. See typical window dimensioning attachment for window elevation with dimensions.


 

 

Thanks

danny

Distinguished Mentor
_Tharwat
Posts: 644
Registered: ‎07-02-2010
Message 2 of 7 (1,677 Views)

Re: Continuous dimension lisp that alternate the dimension position

07-12-2012 08:51 AM in reply to: dkeyser

You forgot to add the  attachment .

____________________________________________________
Get learn and learn and practice , to become experienced guy .
Contributor
dkeyser
Posts: 16
Registered: ‎01-05-2006
Message 3 of 7 (1,672 Views)

Re: Continuous dimension lisp that alternate the dimension position

07-12-2012 09:18 AM in reply to: _Tharwat

Is there a lisp that will allow me to do a continuous dimension, but will alternate the dimension position from low, high, low and high?  If there is no lisp already created, can someone help me to create one? 

 

See Continuous dimension attachment for example.

 

I work at a glass and glazing company and this is how we dimension mullion width and DLO. See typical window dimensioning attachment for window elevation with dimensions.


 

 

Thanks

danny

Contributor
dkeyser
Posts: 16
Registered: ‎01-05-2006
Message 4 of 7 (1,671 Views)

Re: Continuous dimension lisp that alternate the dimension position

07-12-2012 09:20 AM in reply to: _Tharwat

Is there a lisp that will allow me to do a continuous dimension, but will alternate the dimension position from low, high, low and high?  If there is no lisp already created, can someone help me to create one? 

 

See Continuous dimension attachment for example.

 

I work at a glass and glazing company and this is how we dimension mullion width and DLO. See typical window dimensioning attachment for window elevation with dimensions.


 

 

Thanks

danny

*Expert Elite*
scot-65
Posts: 2,210
Registered: ‎12-11-2003
Message 5 of 7 (1,650 Views)

Re: Continuous dimension lisp that alternate the dimension position

07-12-2012 04:01 PM in reply to: dkeyser

This is a snippet of code we use that can be altered to your needs.

If anyone else wishes to pipe in and finish it, be my guest as I do

not have time right now to tinker with it...

 

 (defun DIMPNTS ( / PTX PTS PLST DLPT )
  (setq PTS (getpoint "Select all points: "))
  (setq PLST (list PTS))
  (while (setq PTS (getpoint PTS))
   (setq PLST (append PLST (list PTS)))

  );while
  (setq DLPT (getpoint "\nSelect dimension line location: "))
  (setq PTX (car PLST)) (setq PLST (cdr PLST))
  (foreach PTS PLST
   (command ".dim" USERDM PTX PTS DLPT "" "exit") ;<-- this area requires rework to fit the OP's needs
   (setq PTX PTS)
  );foreach
 );endDIMPNTS

 

What the above does:

Similar to dim continue, first select desired dimension line extension end points, then [Enter], then select

where the dimension line will be located. The foreach will do a "Dim1" and reuse the dimension

line location value. This snippet is part of a whole dimensioning utility that was original to our office

way back when we had R12 (meaning I was not the original author of this section of code).

 

Where:

- USERDM is "Hor", "Ver", etc. as found in the dim command (the gremlin).

- DLPT is the dimension line location.

 

To do:

- Preset or input offset distance of the dimension lines.

- Optional to place first dimension as the higher line (default), or lower line.

- Add a counter and determine if number is even or odd - this will determine location of next dimension...

 

???

Scot-65
Dyslexia is a permanent physical disability that cannot be seen.
Introverts is proof that there is indeed intelligent life on this planet.
*Expert Elite*
scot-65
Posts: 2,210
Registered: ‎12-11-2003
Message 6 of 7 (1,620 Views)

Re: Continuous dimension lisp that alternate the dimension position

07-13-2012 03:18 PM in reply to: dkeyser

OK, I found a little time, restructured the snippet into a full command, and did minor testing.

Because of the program structure (with a command inside), an *error* handler was not required.

Adjust "c1" as needed (currently it is 10).

 

DMZ01.gif

 

DMZ.lsp - Dimension Zigzag. Horizontal or Vertical orientation. DYNmode friendly. Orientation retained in current session.

 

I also thought of using DMST as a possible name "Saw Tooth" or "Stagger"...

 

Have Fun!

 

Scot-65

 

Scot-65
Dyslexia is a permanent physical disability that cannot be seen.
Introverts is proof that there is indeed intelligent life on this planet.
Contributor
dkeyser
Posts: 16
Registered: ‎01-05-2006
Message 7 of 7 (1,587 Views)

Re: Continuous dimension lisp that alternate the dimension position

07-18-2012 11:17 AM in reply to: dkeyser

thanks

 

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.