Jump to content

Recommended Posts

Posted

I have a lisp as follows:

 

 
(defun c:2c( / cla 2cCL 2cOM 2cOS 2cCC 2cCE 2cFS)
 (setq 2cCL (getvar "clayer"))
(setq 2cOM (getvar "orthomode"))
(setq 2cOS (getvar "osmode"))
(setq 2cCC (getvar "cecolor"))
(setq 2cCE (getvar "cmdecho"))
; First construct our entity list
(setq vl1 (list
 (cons 0 "LAYER")  ;Name of entity
 (cons 100 "AcDbSymbolTableRecord")     ;Open Records
 (cons 100 "AcDbLayerTableRecord")     ;Locate Layer Table
 (cons 2 "CCC_DOER_Cross_Sections_Quantities_Material_2C")  ;Name of Layer
 (cons 6 "Continuous")      ;Linetype
 (cons 62 33)       ;colour = light grey
 (cons 70 0)       ;state
 (cons 290 1)       ;1=plot, 0=Don't plot
 (cons 370 0)       ;Line weight
  )       ;End of entity list
 )
 (entmake vl1)       ;Create Layer

(setvar "clayer" "CCC_DOER_Cross_Sections_Quantities_Material_2C")
(setvar "cmdecho" 0)
(command "-hatch" (getpoint "Click internal point: ") "")
(setvar "clayer" 2cCL)
(setvar "orthomode" 2cOM)
(setvar "osmode" 2cOS)
(setvar "cecolor" 2cCC)
(setvar "cmdecho" 2cCE)
(princ)
)

 

How do I set it up so that when the hatch command is called the user has the option to either pick an internal point or to select a boundary??

 

Thanks.

Posted

try this

(command "-hatch")
(while (> (getvar 'CmdActive) 0) (command pause))

Posted

That doesn't give me the options though!!

Posted

try setting cmdecho=1 prior to the hatch command

Posted

Yeah that did the trick alright. Thanks for that Ipseifert and for the very speedy reply!!!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...