Results 1 to 7 of 7

Thread: Help - Need Autolisp program (create a boundary on specific offset, change layer and properties)

  1. #1
    Member
    Join Date
    2007-11
    Location
    Pune
    Posts
    33
    Login to Give a bone
    0

    Question Help - Need Autolisp program (create a boundary on specific offset, change layer and properties)

    Hello All
    I need a help on following task.

    1. create a polyline on specific offset from closed area.
    We can use 'Boundary' command but i want a offset in inner side of area. offset is fixed.

    2. polyline change some fixed property. e.g. layer, color , line weight (can not set for layer)

    3. created polyline joints with fillet with fixed radius.

    Please find attached image for more details.


    Thanks & Regards
    Yogesh
    Attached Images Attached Images

  2. #2
    Member
    Join Date
    2007-11
    Location
    Pune
    Posts
    33
    Login to Give a bone
    0

    Default Re: Help - Need Autolisp program (create a boundary on specific offset, change layer and properties)

    Hello all
    Can anybody give me a program at least for first step?


    Regards
    Yogesh

  3. #3
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL
    Posts
    3,362
    Login to Give a bone
    0

    Default Re: Help - Need Autolisp program (create a boundary on specific offset, change layer and properties)

    Quote Originally Posted by SunYog View Post
    Hello all
    Can anybody give me a program at least for first step?


    Regards
    Yogesh
    Offset towards centroid (will work unless it's an extremely irregular object) then fillet with polyline option.
    Tom Beauford P.S.M. - Civil 2020 on Windows 10 Enterprise
    Design Analysis - Leon County Public Works/Engineering Wrap [CODE] tags around selected text
    2280 Miccosukee Rd. Tallahassee, FL 32308-5310
    Ph# (850)606-1516 Home Page

  4. #4
    Member
    Join Date
    2007-11
    Location
    Pune
    Posts
    33
    Login to Give a bone
    0

    Default Re: Help - Need Autolisp program (create a boundary on specific offset, change layer and properties)

    Thanks a lot for fast reply..
    sorry but i really not understood about 'offset towards centroid', offset has only following options


    Code:
    Command: offset
    Current settings: Erase source=No  Layer=Source  OFFSETGAPTYPE=0
    Specify offset distance or [Through/Erase/Layer] <Through>:
    and boundary has as per attached dialog box(boundary.jpg). Sorry to say could you please tell me again the way. Please find attached pattern (01.jpg) .. and size of DWG is A0

    and basic form (white lines) are 'line' not polylines.

    Thanks & Regards
    YP
    Attached Images Attached Images
    Last edited by BlackBox; 2014-09-20 at 02:38 PM. Reason: Please use [CODE] Tags

  5. #5
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL
    Posts
    3,362
    Login to Give a bone
    0

    Default Re: Help - Need Autolisp program (create a boundary on specific offset, change layer and properties)

    Quote Originally Posted by SunYog View Post
    Thanks a lot for fast reply..
    sorry but i really not understood about 'offset towards centroid', offset has only following options



    Command: offset
    Current settings: Erase source=No Layer=Source OFFSETGAPTYPE=0
    Specify offset distance or [Through/Erase/Layer] <Through>:

    and boundary has as per attached dialog box(boundary.jpg). Sorry to say could you please tell me again the way. Please find attached pattern (01.jpg) .. and size of DWG is A0

    and basic form (white lines) are 'line' not polylines.

    Thanks & Regards
    YP
    Have you done any lisp?

    Since you need to create a boundary first the lisp should start by prompting for and storing a pick point inside that can be used by both the boundary and offset commands. Prompt for and set the offset distance. Use command calls with the same options as you would use on the command line.
    Tom Beauford P.S.M. - Civil 2020 on Windows 10 Enterprise
    Design Analysis - Leon County Public Works/Engineering Wrap [CODE] tags around selected text
    2280 Miccosukee Rd. Tallahassee, FL 32308-5310
    Ph# (850)606-1516 Home Page

  6. #6
    Member
    Join Date
    2014-02
    Posts
    5
    Login to Give a bone
    0

    Default Re: Help - Need Autolisp program (create a boundary on specific offset, change layer and properties)

    Here is my code for picksf.lsp; my program to use the boundary command to read the square footage of a room....
    The boundary is a one line command.... You are also picking a point, for the boundary (variable p1), so the same point should be usable for the offset command... I make the layers I want at the beginning of my code and set clayer to use them... You can kill the area, totaling, and text stuff... Maybe even kill the loop... and add the offset command....

    Code:
    (defun c:picksf()
    	(setq tot 0)
    	(setq p1 (getpoint "\nPick inside room:"))
    	(command "-layer" "n" "area-mask,area" "p" "n" "area-mask" "")
    	(while (/= p1 nil)
    		;do boundary, and read its area, then label sf and add to tot
    		(setvar "clayer" "area-mask")
    		(command "-boundary" p1 "")
    		(setvar "clayer" "area")
    		(command "area" "ob" "l")
    		(setq a1 (getvar "area"))
    		(setq tot (+ tot a1))
    		(command "-text" p1 "0" (strcat (rtos tot 2 2)  " SF"))
    		(setq p1 (getpoint "\nPick inside room:"))
    	)
    	(setq p1 (getpoint "\nTotal Label location:"))
    	(princ (strcat "Total Area = " (rtos tot 2 2) " SF"))
    	(command "-text" p1 "0" (strcat (rtos tot 2 0)  " SF") "")
    	(princ)
    	)
    Last edited by BlackBox; 2014-09-20 at 02:39 PM. Reason: Please use [CODE] Tags

  7. #7
    Mod / Salary / SM Wanderer's Avatar
    Join Date
    2001-12
    Location
    St. Louis
    Posts
    5,335
    Login to Give a bone
    0

    Default Re: Help - Need Autolisp program (create a boundary on specific offset, change layer and properties)

    Just to keep it easy to read, remember in the future to click the "Go Advanced" button (which comes up after hitting one of the reply buttons) and use the code tags available in the bottom right of this screen cap...
    Attached Images Attached Images
    Melanie Stone
    @MistresDorkness

    ARCHIBUS, FMS/FMInteract and AutoCAD Expert (I use Revit and Tririga, too)
    Technical Editor
    not all those who wander are lost

Similar Threads

  1. Autolisp program to label station and offset.
    By aaronic_abacus in forum AutoLISP
    Replies: 7
    Last Post: 2020-09-16, 01:36 AM
  2. Replies: 7
    Last Post: 2013-06-04, 04:01 PM
  3. View/Change Properties in Layer Properties Window
    By mlongfellow in forum AutoCAD General
    Replies: 2
    Last Post: 2007-12-28, 03:37 PM
  4. Change display of layer without changing layer properties
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 0
    Last Post: 2006-09-11, 02:33 PM
  5. offset or copy AND change to current layer
    By mpriest in forum AutoCAD Customization
    Replies: 8
    Last Post: 2005-04-22, 06:08 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
  •