다른 분들 글 올리신거 참고해서 해보려고 했는데 잘 모르겠습니다ㅠㅠ
도와 주세요
클라우드 한번 쓰고 나면 osnap이 매번 꺼져서 새로 체크하고 하고 있습니다.
기존 osnap 설정 해놨던거로 그대로 살아나거나
아니면 내가 쓰는 osnap 항목들은 다시 on off 할 수 있는 명령으로 하고 싶습니다.
주로 끝점 중간점 중심점 사분점 교차점 직교 만 쓰고 있습니다.
;=====================================================CLOUD=================================
;;; PL2Cloud.lsp by Charles Alan Butler
;;; Copyright 2005
;;; by Precision Drafting & Design All Rights Reserved.
;;; Contact at ab2draft@TampaBay.rr.com
;;;
;;; Version 1.0 Beta May 1,2004
;;; Version 1.1 Beta May 5,2004
;;; Added options to size the arc
;;; Version 1.2 Beta May 19,2004
;;; Added option for cloud style
;;; Version 1.3 Beta June 15,2004
;;; Revised to use Dialog Box Interface
;;; Version 1.4 Beta June 23,2004
;;; Dialog Box Revisions
;;; Version 1.5 Beta September 16,2004
;;; Incorperated the Dialog File Creator Routine
;;; Disabled the Chord Length DimScale feature
;;; Version 2.0 October 22,2004
;;; Support for arcs polylines and will also process a picked
;;; spline, circle or ellipse
;;; Version 2.0 October 27,2004
;;; Pline width bug, preset width set to 0 for user draw.
;;; Version 2.1 February 23,2005
;;; Added multiple pick of new cloud, bug fix – remember chord length
;;; Version 2.2 February 24,2005
;;; Added support for rotated UCS
;;; Version 2.3 October 27,2005
;;; Added Layer Selection for cloud
;;; Version 2.4 April 04,2006
;;; Added Help & option to use pline layer, plus clean up of code
;;; Version 2.5 September 25,2006
;;; Bug Fix, CW pline caused when followed by a CCW
;;;
;;; DESCRIPTION
;;; User picks or Draws a LW polyline and the routine draws a revision
;;; cloud along it, User option to delete the original polyline
;;; No UCS supported, Only World
;;;
;;; Files Required to be in the ACAD search path
;;; pl2cloud.dcl ; note- created by this lisp
;;; rc_normal.sld ; slides are found in the zip file
;;; rc_shadow.sld
;;; rc_length.sld
;;;
;;; Limitations
;;; No error checking when object pline is too small
;;;
;;;
;;; Command Line Usage
;;; Command: PL2Cloud
;;; Dialog Box is displayed unless there is a problem
;;; Then the command line version is as follows
;;; Enter method to get polyline. [Pick / Draw / Options / Shadow] <Pick>:
;;; Keep the original polyline [Yes No] <No>:y
;;; Pick Polyline to cloud:
;;;
;;; Options: Command Line Version
;;; Pick – allows user to pick an existing poly line
;;; Draw – allows user to draw a new polyline
;;; Shadow – toggles the shadow effect on/off
;;; Options – Change Arc Angle, makes arcs fatter or thinner
;;; Change the chord length of the arcs
;;; Enter a new Chord length or negative number to divide into DimScale
;;; Enter the actual chord length desired or
;;; enter a negative number and that number will be divided into
;;; the current dimscale to derive the chord length
;;;
;;; This software is provided “as is” without express or implied ;
;;; warranty. All implied warranties of fitness for any particular ;
;;; purpose and of merchantability are hereby disclaimed. ;
;;; You are hereby granted permission to use, copy and modify this ;
;;; software without charge, provided you do so exclusively for ;
;;; your own use or for use by others in your organization in the ;
;;; performance of their normal duties, and provided further that ;
;;; the above copyright notice appears in all copies and both that ;
;;; copyright notice and the limited warranty and restricted rights ;
;;; notice appear in all supporting documentation. ;
(prompt “Loading PL2Cloud….”)
(defun c:cl2 (/ dscale plw dist spcs
usercmd useros *error* a270 a90
userbm oer oldplw ent entlst
oldent method keeppl useds arcang
chord cloud_style draw_style Plreverse
keeppl cur_lay PlineLay cur_lay_old
)
;;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
(defun *error* (msg)
(if
(not
(member
msg
‘(“console break” “Function cancelled” “quit / exit abort” “”)
)
)
(princ (strcat “nError: ” msg))
) ; if
(setvar “Plinewid” oldplw)
(setvar “blipmode” userbm) ;reset blipmode
(setvar “CMDECHO” usercmd)
(setvar “osmode” useros)
(setq pl2cloudglobal (put_saved_vars)
userbm nil
oldplw nil
usercmd nil
useros nil
)
(princ)
) ;end error function