cso Posted April 28, 2011 Share Posted April 28, 2011 I have been trying to debug this and nothing I do seems to work. I am writing a simple routine to draw two lines and then a chamfer. It makes my lines but does not recognize the "chamfer" command. I tried "_.chamfer", as suggested on other forums but that doesn't work either. I was picking a distance of 1" for both distances. I know it isn't a pretty lisp program, but I just started this in class and it seems like it should work. Thanks (defun C:chamfer2() (setq p1 (getpoint "\n enter first point of line")) (setq p2 (getpoint "\n enter second point of line")) (setq p3 (getpoint "\n enter third point")) (command "line" p1 p2 "") (command "line" p1 p3 "") (setq d1(getdist "\n get first chamfer distance")) (setq d2 (getdist "\n get second chamfer dist")) (setvar "chamfera" d1) (setvar "chamferb" d2) (command "chamfer" pause pause) ) Quote Link to comment Share on other sites More sharing options...
alanjt Posted April 28, 2011 Share Posted April 28, 2011 Should work. It might be a language issue. Try replacing "chamfer" with "_.chamfer". Quote Link to comment Share on other sites More sharing options...
cso Posted April 28, 2011 Author Share Posted April 28, 2011 I tried that again and it worked! I think I was using too large of a distance. Why do I have to use _.? What would cause a language compatibility issue? Thanks for your help. Quote Link to comment Share on other sites More sharing options...
alanjt Posted April 28, 2011 Share Posted April 28, 2011 I tried that again and it worked! I think I was using too large of a distance. Why do I have to use _.? What would cause a language compatibility issue? Thanks for your help. Is your native language English? Autodesk is an American company, thus everything is coded in English. The "_" as a prefix to a command will take the original (English) command name. The "." is to ignore if a command has been redefined. In this situation it isn't needed, but it's just a 'best practices' situation. Quote Link to comment Share on other sites More sharing options...
cso Posted April 28, 2011 Author Share Posted April 28, 2011 Yes, it is English. I am using AutoCad Architecture 2011 Student version. Is there a way to tell if a command has been redefined? I have been working on a lot of lisp routines and practicing from different sources, maybe I changed something. Quote Link to comment Share on other sites More sharing options...
alanjt Posted April 28, 2011 Share Posted April 28, 2011 Yes, it is English. I am using AutoCad Architecture 2011 Student version. Is there a way to tell if a command has been redefined? I have been working on a lot of lisp routines and practicing from different sources, maybe I changed something. You can reset it by typing: Command: redefine Enter command name: chamfer Some of the newer releases act a little odd if the "_." aren't added. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.