Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: Custom dimentioning by Lisp

  1. #11
    Member
    Join Date
    2016-10
    Posts
    31
    Login to Give a bone
    0

    Default Re: Custom dimentioning by Lisp

    thank you for assistance friend,

    any possibility for taking least coordinate line value as 0'-0" from selection list?

    Thanks.

  2. #12
    Certifiable AUGI Addict tedg's Avatar
    Join Date
    2005-06
    Location
    in the upper right corner
    Posts
    3,507
    Login to Give a bone
    0

    Default Re: Custom dimentioning by Lisp

    Quote Originally Posted by Structo View Post
    thank you for assistance friend,

    any possibility for taking least coordinate line value as 0'-0" from selection list?

    Thanks.
    Sorry man, this is all I have.

    I have explained what you should do in regard to placing your geometry at WCS: 0,0 and ordinate dimensions, I don't know of a better way to do what you want.
    Maybe others will provide some input to help you further along.

    Just so you know..
    AUGI is meant to get and give help when members can, we all have jobs too.
    It's not a free programming service (I'm not trying to be rude, sorry if it sounds that way).
    It's ok to ask for help here, but, it's usually best if you give it a try first an post what you have, instead of asking for people to provide a routine.

    Good luck Stucto,
    [cheers]

  3. #13
    Member
    Join Date
    2010-11
    Posts
    7
    Login to Give a bone
    0

    Default Re: Custom dimentioning by Lisp

    Quote Originally Posted by tedg View Post
    Good morning Structo,
    I'm not sure I understand, you want the first line to be "0" without selecting origin?

    Just so you know, "Ordinate" dimensions sees "0" at the origin of the current coordinate system being used.
    So that is why I have the routine ask for "origin" (because it isn't at that point already).

    If it were me, while doing your work, I would put the line you want at "0" at "0,0" while in the World Coordinate System, and then you wouldn't need to select the origin.
    The lisp routine would need to get adjusted, see below, I removed the "place origin" part:
    Code:
    (defun c:foo2 (/ lin la lr1) 		;; defines function "foo2" (command) you can change to whatever you'd like, and (/ list of local variables)
    (setvar "ucsicon" 3)  				;; sets your uscicon to on and at origin
    (setq lin (ssget))  				;; sets "lin" equal to what you select (you select all the lines you want dimensioned)
    (setq la (getvar "clayer")) 			;; records your current layer and sets it equal to "la"
    (setq lr1 (tblsearch "layer" "Dim"))		;; searches for the layer named "Dim" and sets it equal to "lr1"
    	(if (= lr1 nil)				;; if "lr1" not found (doesn't exist) it moves to the following function, if found, skips following function
    (command "-layer" "make" "Dim" "color" "6" "" "")) ;;makes the layer "Dim" because it wasn't found
    (command "-layer" "t" "Dim" "s" "Dim" "")	;; thaws and sets "Dim" layer current
    (command "_qdim" lin "" "ordinate" pause "")	;; runs the quick-dim command, ordinate dimensions, on the lines and origin you selected, (you need to place the dims)	
    (setvar "clayer" la)				;; re-sets your recorded current layer
    (princ)						
    )						;; end of routine
    (princ)
    Also attached a version of your "sample" drawing, you'll see the bottom of the first line is at "0,0" in the WCS, which is were it should be to do what you want to do.
    Hi Tedg
    Thanks for this wonderful code;

    I would like to know is there any way it can place the dimension on layers of the corresponding lines instead of dim layer.

    Thanks in advance.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Custom Lisp Tracker
    By fletch97 in forum AutoLISP
    Replies: 41
    Last Post: 2019-02-02, 06:41 AM
  2. Lisp for custom linetype
    By rickquin651723 in forum AutoLISP
    Replies: 3
    Last Post: 2016-05-09, 12:16 AM
  3. Custom LISP Routine please!
    By Crask422 in forum AutoLISP
    Replies: 1
    Last Post: 2015-02-08, 06:24 PM
  4. Get SSM Custom Property Via LISP
    By BlackBox in forum AutoLISP
    Replies: 3
    Last Post: 2010-07-20, 08:30 PM
  5. dimentioning in legend views
    By Revit User in forum Revit Architecture - General
    Replies: 2
    Last Post: 2007-04-24, 01:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •