Jump to content

Recommended Posts

Posted (edited)

Hello.

I'm experiencing a strange situation with break command. I want to cut a line at a specific place using "nearest" snap.

I use the following commands:

Quote

 

break

<select a line>

f

<pick a point on the line using "nearest" snap>

@

 

This works perfectly, a line splits into two at the selected point.

 

However, when I attempt use of

(command "break" pause "f" pause "@")

it removes chunk of the line...what am I doing wrong?

 

P.S.

This worked fine in AutoCAD 2002

 

 

[EDIT]

By adding nea before submitting second point seems to fix the issue.

But I still would like to know why there are different results when commands entered manually vs using (command) function

 

Command: break
Select object:
Specify second break point or [First point]: f
Specify first break point: _nea to
Specify second break point: @

 

Command: (command "break" pause "f" pause "nea" "@")
break Select object:
Specify second break point or [First point]: f
Specify first break point: _nea to
Specify second break point: nea to @
Edited by vanowm
Found a solution
  • vanowm changed the title to break a line at a nearest point works only with manual command
Posted

This is why i try to stay away from using (command  it doesn't always  behave like it does when your typing in commands. I don't remember the command but I found out that using (vla-SendCommand worked when (command was giving me issues.

 

(vla-sendcommand (vla-get-ActiveDocument (vlax-get-acad-object)) "break" pause "f" pause "@")

 

Quote

But I still would like to know why there are different results when commands entered manually vs using (command) function

 

Chalk it up to you have a setting that is set different or AutoDesk programmed the break command updated/changed since 2002.

(command "break" pause "f" pause "@") worked for me in 2019 BricsCAD.

Posted

(command "break" pause "f" pause "@") works on AutoCAD 2022 for me as well.

Posted

I've already found a few other commands that are different when used (command). I.e. fillet, note the options:

Command: fillet
Current settings: Mode = TRIM, Radius = 0.0000
Select first object or [Undo/Polyline/Radius/Trim/Multiple]:

 

Command: (command "fillet")
nil
Select first object or [uNdo/Polyline/Radius/Trim/mUltiple]:

 

Posted

For fillet if I remember correctly fillet supports various methods in lisp.

 

Just looked through code I have and there are 3 different ways.

pt1 pt2,

ent pt,

ent ent.

I think it depends on what your filleting like a pline and a line.

Posted

Yes, but why in the world would they change Undo to uNdo and Multiple to mUltiple

It wasn't the case in AC2002

Posted
On 4/3/2023 at 4:48 AM, vanowm said:

I've already found a few other commands that are different when used (command). I.e. fillet, note the options:

Command: fillet
Current settings: Mode = TRIM, Radius = 0.0000
Select first object or [Undo/Polyline/Radius/Trim/Multiple]:

 

Command: (command "fillet")
nil
Select first object or [uNdo/Polyline/Radius/Trim/mUltiple]:

 

(initcommandversion)
(command "_.fillet")
;; Select first object or [Undo/Polyline/Radius/Trim/Multiple]:

 

  • Like 1

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