Autocad-2005-简体中文-解密版.zip

源代码在线查看: gpmain.lsp

软件大小: 402261 K
上传用户: zfj110120
关键词: Autocad 2005 zip 简体中文
下载地址: 免注册下载 普通下载 VIP

相关代码

				;;;                                                                    ;
				;;;  GPMAIN.LSP                                                        ;
				;;;                                                                    ;
				;;;  Copyright 1987, 1988, 1990, 1992, 1994, 1996, 1997, 1998          ;
				;;;  by Autodesk, Inc. All Rights Reserved.                            ;
				;;;                                                                    ;
				;;;  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 below appear in all supporting documentation.              ;
				;;;                                                                    ;
				;;;  Incorporation of any part of this software into other software,   ;
				;;;  except when such incorporation is exclusively for your own use    ;
				;;;  or for use by others in your organization in the performance of   ;
				;;;  their normal duties, is prohibited without the prior written      ;
				;;;  consent of Autodesk, Inc.                                         ;
				;;;                                                                    ;
				;;;  Copying, modification and distribution of this software or any    ;
				;;;  part thereof in any form except as expressly provided herein is   ;
				;;;  prohibited without the prior written consent of Autodesk, Inc.    ;
				;;;                                                                    ;
				;;;  AUTODESK PROVIDES THIS SOFTWARE "AS IS" AND WITH ALL FAULTS.      ;
				;;;  AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF           ;
				;;;  MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE.  AUTODESK,       ;
				;;;  INC. DOES NOT WARRANT THAT THE OPERATION OF THE SOFTWARE          ;
				;;;  WILL BE UNINTERRUPTED OR ERROR FREE.                              ;
				;;;                                                                    ;
				;;;  Restricted Rights for US Government Users.  This software         ;
				;;;  and Documentation are provided with RESTRICTED RIGHTS for US      ;
				;;;  US Government users.  Use, duplication, or disclosure by the      ;
				;;;  Government is subject to restrictions as set forth in FAR         ;
				;;;  12.212 (Commercial Computer Software-Restricted Rights) and       ;
				;;;  DFAR 227.7202 (Rights in Technical Data and Computer Software),   ;
				;;;  as applicable.  Manufacturer is Autodesk, Inc., 111 McInnis       ;
				;;;  Parkway, San Rafael, California 94903.                            ;
				;;;                                                                    ;
				
				;;;--------------------------------------------------------------------;
				;;;  This file is from the Garden Path tutorial, and represents the    ;
				;;;  state of the application at the end of Lesson 1.  Use this file   ;
				;;;  to check your work, or to start off Lesson 2 with the code as it  ;
				;;;  appears in the tutorial.                                          ;
				;;;--------------------------------------------------------------------;
				
				
				;;;--------------------------------------------------------------------;
				;;;     Function: gp:getPointInput                                     ;
				;;;--------------------------------------------------------------------;
				;;;  Description: This function will ask the user to select three      ;
				;;;               points in the drawing, which will determine the      ;
				;;;               path location, direction, and size.                  ;
				;;;--------------------------------------------------------------------;
				(defun gp:getPointInput	()
				  (alert
				    "Function gp:getPointInput will get user drawing input"
				  )
				  ;; For now, return T, as if every task in the function worked correctly
				  T
				) ;_ end of defun
				
				
				;;;--------------------------------------------------------------------;
				;;;     Function: gp:getDialogInput                                    ;
				;;;--------------------------------------------------------------------;
				;;;  Description: This function will ask the user to determine the     ;
				;;;               following path parameters:                           ;
				;;;                   Tile size, Tile spacing                          ;
				;;;                   Boundary polyline type                           ;
				;;;                   Entity creation method                           ;
				;;;--------------------------------------------------------------------;
				(defun gp:getDialogInput ()
				  (alert
				    "Function gp:getDialogInput will get user choices via a dialog"
				  )
				  ;; For now, return T, as if every task in the function worked correctly
				  T
				) ;_ end of defun
				
				
				;;;--------------------------------------------------------------------;
				;;;     Function: gp:drawOutline                                       ;
				;;;--------------------------------------------------------------------;
				;;;  Description: This function will draw the outline of the garden    ;
				;;;               path.                                                ;
				;;;--------------------------------------------------------------------;
				(defun gp:drawOutline ()
				  (alert
				    (strcat "This function will draw the outline of the polyline "
					    "\nand return a polyline entity name/pointer."
				    ) ;_ end of strcat
				  ) ;_ end of alert
				  ;; For now, simply return a quoted symbol.  Eventually, this function
				  ;; will return an entity name or pointer
				  'SomeEname
				) ;_ end of defun
				
				
				;;;********************************************************************;
				;;;     Function: C:GPath        The Main Garden Path Function         ;
				;;;--------------------------------------------------------------------;
				;;;  Description: This is the main garden path function.  It is a C:   ;
				;;;               function, meaning that it is turned into an AutoCAD  ;
				;;;               command called GPATH.  This function determines the  ;
				;;;               overall flow of the Garden Path program              ;
				;;;********************************************************************;
				(defun C:GPath (/ PolylineName)
				  ;; Ask the user for input: first for path location and
				  ;; direction, then for path parameters.  Continue only if you have
				  ;; valid input.
				  (if (gp:getPointInput)
				    (if	(gp:getDialogInput)
				      (progn
					;; At this point, you have valid input from the user.
					;; Draw the outline, storing the resulting polyline "pointer"
					;; in the variable called PolylineName
					(setq PolylineName (gp:drawOutline))
					(princ "\nThe gp:drawOutline function returned 					(princ PolylineName)
					(princ ">")
					(Alert "Congratulations - your program is complete!")
				      ) ;_ end of progn
				      (princ "\nFunction cancelled.")
				    ) ;_ end of if
				    (princ "\nIncomplete information to draw a boundary.")
				  ) ;_ end of if
				  (princ)				; exit quietly
				) ;_ end of defun
				
				;;; Display a message to let the user know the command name
				(princ "\nType GPATH to draw a garden path.")
				(princ)			

相关资源