Jump to content

Recommended Posts

Posted

i get this with this code will it work with 2010?

Enter chamfer distance: Specify second point:

Enter chamfer angle:30

Unknown command "CHAMFER". Press F1 for help.

 

(defun c:chamf (/ d a)
(setvar "cmdecho" 0)
  (graphscr)
  (setq d (getdist "\n Enter chamfer distance:"))
  (setq a (getangle "\n Enter chamfer angle:"))
  (setvar "chamfera" d)
  (setvar "chamferb" (* d (/ (sin a)(cos a))))
  (Command "chamfer")
 (setvar "cmdecho" 1)
 (princ) 
 )

Posted

What you want this lisp do?

 

Well, i don't have autocad2010 here... but, i think this lisp does... nothing.

Posted

new to lisps, but no where do you tell it what to chamfer with what. Getting all the info about the chamfer is great but you never say whats first second angle for the chamfer just cuz you know whats supposed to go where doesnt mean the program does

Posted
i get this with this code will it work with 2010?

Enter chamfer distance: Specify second point:

Enter chamfer angle:30

Unknown command "CHAMFER". Press F1 for help.

 

(defun c:chamf (/ d a)
(setvar "cmdecho" 0)
  (graphscr)
  (setq d (getdist "\n Enter chamfer distance:"))
  (setq a (getangle "\n Enter chamfer angle:"))
  (setvar "chamfera" d)
  (setvar "chamferb" (* d (/ (sin a)(cos a))))
  (Command "chamfer")
 (setvar "cmdecho" 1)
 (princ) 
 )

 

John

 

I tested in 2009 and it works. Not sure if you are having a 2010 quirk, But make sure your lisp is in the ACAD Search Support Path.

 

Good Luck,

The Buzzard

Posted

I put the lisp in the support folder

and the command work when i changed profiles than i change back and it stoped again ?

must be profile driven but im not sure how

Posted

is the support file in both profiles?

Posted

Why don't you just put it in a folder of your choice and add that folder under Tools, Options, File tab, add the folder to the Support File Search Path.

OPTIONS.JPG

Posted
I put the lisp in the support folder

and the command work when i changed profiles than i change back and it stoped again ?

must be profile driven but im not sure how

 

If you were ever to decide on upgrading your CAD version and the file was in the Support directory and you remove your old version. You would most likely lose the file if you do not remember its there.

Posted

Also under Options you can set it to any Profile under the Profile tab as well.

Each Profile has their specific Support File Search Path.

Posted

I'll try to restart my computer but so far no luck . I didnt have to put my folder in a support path before ? and i allways loaded just from vlisp i also have 2009 and it wont work there either i broke something

for sure. is it a variable or something ? or a toggle

Posted
I'll try to restart my computer but so far no luck . I didnt have to put my folder in a support path before ? and i allways loaded just from vlisp i also have 2009 and it wont work there either i broke something

for sure. is it a variable or something ? or a toggle

 

Well as I said before, I tested it in 2009 and it works. Guess you will need to look elsewhere. There is nothing wrong with the program.

Posted

Can you try:

 

(command "_.CHAMFER")
(while (> (getvar "CMDACTIVE") 0)
         (command pause))

-David

Posted

I appreciate everyones help and patience. below is the reaction from code by david. I hope i dont get banned from this site for posting dumb questions.

 

 
Command:
*Invalid selection*
Expects a point or 
Window/Last/Crossing/BOX/Fence/WPolygon/CPolygon/uNdo/Polyline/Distance/Angle/Tr
im/Method
Select first line or [uNdo/Polyline/Distance/Angle/Trim/Method/mUltiple]:
*Invalid selection*
Expects a point or Window/Last/Crossing/BOX/Fence/WPolygon/CPolygon
Select second line or shift-select to apply corner:

 

 

this is how it work with just typing it in chamfer

 

 

Command: chamfer

(Trim mode) Current chamfer Dist1 = 5.0000, Dist2 = 0.4374

Select first object or [undo/Polyline/Distance/Angle/Trim/mEthod/Multiple]:

Command: ._chamfer

(TRIM mode) Current chamfer Dist1 = 5.0000, Dist2 = 0.4374

Select first line or [undo/Polyline/Distance/Angle/Trim/mEthod/Multiple]:

56137.9840,-16170.8534,0.0000

Posted

Try setting CMDECHO to 1 and see what shows up on the screen. Don't worry about asking too many legit questions, that's what this place is about. -David

Posted

 
(setvar “cmdecho” 1)

 

I don't know what i would do with out all of my friends here>

 

:oops:

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...