repost - point selection similar to stretch command

repost - point selection similar to stretch command

Anonymous
Not applicable
305 Views
8 Replies
Message 1 of 9

repost - point selection similar to stretch command

Anonymous
Not applicable
How can I form a collection of points (ie: end points of existing objects)
in a manner similar to how the stretch command does?

Unlike the stretch command, I would like to be able to continue adding
to the collection using either window or individual point selection until
I have completed the collection.

I am using AM2K with Windows NT.

tia for help
0 Likes
306 Views
8 Replies
Replies (8)
Message 2 of 9

Anonymous
Not applicable
How about using "select" command.

Sal Brusco wrote in message
news:[email protected]...
> How can I form a collection of points (ie: end points of existing objects)
> in a manner similar to how the stretch command does?
>
> Unlike the stretch command, I would like to be able to continue adding
> to the collection using either window or individual point selection until
> I have completed the collection.
>
> I am using AM2K with Windows NT.
>
> tia for help
>
>
>
>
0 Likes
Message 3 of 9

Anonymous
Not applicable
I saw the first post and would gladly have responded with whatever I know,
but I couldn't comprehend what you are trying to do. I was hoping someone
else would understand it and help you.

Maybe you could explain further?
--
= = = = = = = = = = = = = = = = =
"Guaranteed not to rust, bust, collect dust, rip,
ravel, sling gravel, or stink in the summertime."
= = = = = = = = = = = = = = = = =
Chuck Wheat [email protected]
= = = = = = = = = = = = = = = = =
0 Likes
Message 4 of 9

Anonymous
Not applicable
Chuck Wheat wrote in message <[email protected]>...
>Maybe you could explain further?
>

Sorry for not being clear on this post, but the idea was clear in my mind
and I forgot you guys only appear to be supernatural. Let me give it another
try.

My company is moving from an unsupported CAD system (VisionAEL) to AutoCAD.
One command that vael had, called the distance command, allows you to pick
two points and in turn, place a temporary dimension on the drawing
(horizontal, vertical or aligned) and prompts you for a _new_ dimension. If
you enter a distance other than what was between the two selected points,
you are then asked to select any additional points that should move. Then
vael would 'stretch' all the points to accommodate the new dimension while
constraining movement to be parallel with the dimension. The first point
selected is always the anchor point and the second point is stretched along
with any additional points you select, not restricted to the most recent
selection but allowing you to continue adding and deleting points from the
collection until complete.

As you can imagine, this is a very useful command, used by our engineers
_very_ much, and they want the same functionality in acad.

Here is the problem. If I were collecting objects, I could collect them in a
selection set. But I'm only interested in end points of objects similar to
the way the stretch command collects points because, in effect, I will
programmatically initiate the stretch command once I have determined which
points I want to 'move'.

Desired effect:
1. The collection should start with the second point of the initial
dimension.
2. Points should be able to be selected one-at-a-time by selecting points
_or_ by windowing like in the stretch command.
3. I want to be able to add and remove points as the spirit moves me (or as
the engineers want.)

Sorry if I'm now too verbose but maybe the original question will make more
sense now.

tia for your responses, but i won't be able to reply again until Monday.
0 Likes
Message 5 of 9

Anonymous
Not applicable
You might be making this harder than it needs to be. I have a routine that
does just that, and all I did was perform a distance command, like so:

(initget 1) ; disallow null input
(setq PT1 (getpoint "\nBase point: ")) ; get the base point
(initget 1) ; disallow null input
(setq PT2 (getpoint PT1 "\nOther point: "))
(setvar "cmdecho" 1) ; turn echo on
(command ".dist" PT1 PT2) ; show user the dist of PT1-PT2
(setvar "cmdecho" 0) ; turn echo off

then ask if that is ok. If the user hits , INP is nil, otherwise they
selected a new distance. If that is so, then do the selection of objects,
and stretch in the same direction as the first distance.

(setq INP (getdist "New distance, or : "))
(if INP ; if input
(progn ; then...
(setq PT2 (polar PT1 (angle PT1 PT2) (- INP (distance PT1 PT2))))
(prompt "\nSelect objects by crossing: ")
(initget 1) ; disallow null input
(setq PT3 (getpoint "\nFirst corner: ")) ; get first point of stretch
window
(initget 1) ; disallow null input
(setq PT4 (getcorner PT3 "\nOther corner: ")) ; get other point
(setq OSMode (getvar "OSMode")) ; save running osnaps
(setvar "OSMode" 0) ; clear running osnaps
(command ".select" "c" PT3 PT4 pause) ; allow user to remove entities if
req'd
(command ".stretch" "w" PT3 PT4 "p" "" PT1 PT2) ; get entities, do
stretch
(setvar "OSMode" OSMode) ; restore running osnaps
) ; closes progn
) ; closes if

Wrap all that into a (defun) of your choice!

--
R. Robert Bell, MCSE
Network Administrator (or, Modern-day Wizard)
(remove the "not." in my address for direct e-mail)

Sal Brusco wrote in message
news:[email protected]...
> One command that vael had, called the distance command, allows you to pick
> two points and in turn, place a temporary dimension on the drawing
> (horizontal, vertical or aligned) and prompts you for a _new_ dimension.
If
> you enter a distance other than what was between the two selected points,
> you are then asked to select any additional points that should move.
0 Likes
Message 6 of 9

Anonymous
Not applicable
Thank you very much, this looks like the answer.

R. Robert Bell wrote in message <[email protected]>...
>You might be making this harder than it needs to be. I have a routine that
>does just that, and all I did was perform a distance command, like so:
0 Likes
Message 7 of 9

Anonymous
Not applicable
Oops…this is _not_ what I wanted.

The main problem that I'm faced with is that I want to be able to add and
remove points from the 'stretch set', but as you know, if you make multiple
crossings in the stretch command, it considers only the most recent
crossing.

I would really like to have prompts like:
Anchor point:
Distance point:
Select objects:
Add/Remove objects:
Add/Remove objects:
Add/Remove objects:
Add/Remove objects:
Add/Remove objects:

and affect all selected objects this is why I am trying to create the
selection set outside of the stretch command. I also realize that I could
collect objects but then the result would not be like a stretch but rather a
move, and I still want to be able to effect, for instance, only one end
point of an arc or a line.

R. Robert Bell wrote in message <[email protected]>...
>You might be making this harder than it needs to be. I have a routine that
>does just that, and all I did was perform a distance command, like so:
0 Likes
Message 8 of 9

Anonymous
Not applicable
Sal - What you're asking for sounds very much
like multiple-grip editing.

Try this:

At the Command prompt, select the objects you
want to stretch, then while holding down the
shift key, click on each grip point that you
want to move. Once you've selected all desired
grips, let go of the shift key, click any grip
and drag it. All selected grips will move along
with the one being dragged.

Sal Brusco wrote:
>
> Oops…this is _not_ what I wanted.
>
> The main problem that I'm faced with is that I want to be able to add and
> remove points from the 'stretch set', but as you know, if you make multiple
> crossings in the stretch command, it considers only the most recent
> crossing.
>
> I would really like to have prompts like:
> Anchor point:
> Distance point:
> Select objects:
> Add/Remove objects:
> Add/Remove objects:
> Add/Remove objects:
> Add/Remove objects:
> Add/Remove objects:
>
> and affect all selected objects this is why I am trying to create the
> selection set outside of the stretch command. I also realize that I could
> collect objects but then the result would not be like a stretch but rather a
> move, and I still want to be able to effect, for instance, only one end
> point of an arc or a line.
>
> R. Robert Bell wrote in message <[email protected]>...
> >You might be making this harder than it needs to be. I have a routine that
> >does just that, and all I did was perform a distance command, like so:

--
/*********************************************************/
/* Tony Tanzillo Design Automation Consulting */
/* Programming & Customization for AutoCAD & Compatibles */
/* ----------------------------------------------------- */
/* [email protected] */
/* http://ourworld.compuserve.com/homepages/tonyt */
/*********************************************************/
0 Likes
Message 9 of 9

Anonymous
Not applicable
Sal,

At the (command ".select" ...) portion of the program, the pause allows you
to do all the entity selection you want. You could use a (prompt
"\nAdd/Remove objects: ") right before that to clue the operators. So you
can cross one big area, then remove, by crossing, what you don't want.
Starting with R14, stretch allowed you to remove by window/crossing, w/o
messing up the initial selection.

--
R. Robert Bell, MCSE
Network Administrator (or, Modern-day Wizard)
(remove the "not." in my address for direct e-mail)

Sal Brusco wrote in message
news:[email protected]...
> Oops.this is _not_ what I wanted.
>
> The main problem that I'm faced with is that I want to be able to add and
> remove points from the 'stretch set', but as you know, if you make
multiple
> crossings in the stretch command, it considers only the most recent
> crossing.
0 Likes