Author Topic: Help with snippet of code  (Read 4110 times)

0 Members and 1 Guest are viewing this topic.

ronjonp

  • Needs a day job
  • Posts: 7027
Re: Help with snippet of code
« Reply #15 on: September 10, 2010, 12:31:18 PM »
Is the "U" supposed to be Multiple? For me (v2009), it's undo.

That's a part of what I asked in my original question. When you type chamfer from the command line, U is for undo but when you write it as (command "._chamfer" ...) the "u" is for mUltiple, and I have no idea why.

BTW thank you Ron that was what i was trying to do with l1, l2, etc. One stupid question though; does the "select line" prompt come from within the chamfer command itself? 

Here is where the prompt is:

Code: [Select]
  (setq l1 (car (entsel "\nSelect line one meng: "))
l2 (car (entsel "\nSelect line two meng: "))
  )

Windows 10 x64 - AutoCAD /C3D 2020

Custom Build PC

alanjt

  • Needs a day job
  • Posts: 5327
  • Standby for witty remark...
Re: Help with snippet of code
« Reply #16 on: September 10, 2010, 12:33:21 PM »
If Chamfer acts like Fillet, I wouldn't (car (entsel)), I would leave the selection point data and feed it to the command. That way you don't have issues trying to Chamfer at the wrong end.
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

mbdoyle

  • Guest
Re: Help with snippet of code
« Reply #17 on: September 10, 2010, 12:51:30 PM »
Is the "U" supposed to be Multiple? For me (v2009), it's undo.

That's a part of what I asked in my original question. When you type chamfer from the command line, U is for undo but when you write it as (command "._chamfer" ...) the "u" is for mUltiple, and I have no idea why.

BTW thank you Ron that was what i was trying to do with l1, l2, etc. One stupid question though; does the "select line" prompt come from within the chamfer command itself? 

Here is where the prompt is:

Code: [Select]
  (setq l1 (car (entsel "\nSelect line one meng: "))
l2 (car (entsel "\nSelect line two meng: "))
  )


I just typed (car(entsel)) at the command line and it prompted me to select an object..cool. Thank you.

Lee Mac

  • Seagull
  • Posts: 12268
  • London, England
Re: Help with snippet of code
« Reply #18 on: September 10, 2010, 01:52:13 PM »
Is the "U" supposed to be Multiple? For me (v2009), it's undo.

Did you try out the last "test" function?

For me:

Quote
LISP ROUTINE
Select object: _.chamfer
(TRIM mode) Current chamfer Length = 0'-0 3/4", Angle = 90
Select first line or [uNdo/Polyline/Distance/Angle/Trim/Method/mUltiple]: U
Select first line or [uNdo/Polyline/Distance/Angle/Trim/Method/mUltiple]:
Select second line or shift-select to apply corner:
Select first line or [uNdo/Polyline/Distance/Angle/Trim/Method/mUltiple]:

COMMAND
Command: chamfer
(TRIM mode) Current chamfer Length = 0'-0 3/4", Angle = 90
Select first line or [Undo/Polyline/Distance/Angle/Trim/mEthod/Multiple]:
How odd, I get the same thing. Precisely why I made my previous suggestion.

Untested, but could this be a case of

Code: [Select]
(initcommandversion)
?