I need a routine to scale the intersection of several paralels lines:
- Draw a line from pick point to pick point.
- Select all objects with ssget crossing (using two picked points)
- Collect coordinates using
- Draw in dimensions with collected coordinates
Can someone help me?
Solved! Go to Solution.
Solved by Kent1Cooper. Go to Solution.
I would use Fence selection in (ssget), rather than Crossing.
This would be comparatively simple if all the intersecting objects are always Lines -- you could use (inters) with the picked points and each Line's endpoints. Put those locations in a List, and sort them by distance from one of the picked points. Make Aligned Dimensions in order, with both extension lines suppressed.
If they might be other kinds of things, you would probably need to use the (vla-intersectwith) method, which would take some more code, but is probably not insurmountable.
Hi Kent,
@antistar wrote:....
I need something like the command QDIM.
But the command QDIM creates unnecessary extension lines.
....
QDIM won't make extension lines if you have them suppressed -- (setvar 'DIMSE1 1) (setvar 'DIMSE2 1).
But in my A2004 at least, QDIM won't do the diagonal variety in your example, using virtual intersection points instead of actual entity geometry. If that's still true in later versions, I could try to come up with something that does what I outlined before.
@antistar wrote:I need a routine to scale the intersection of several paralels lines:
- Draw a line from pick point to pick point.
- Select all objects with ssget crossing (using two picked points)
- Collect coordinates using
- Draw in dimensions with collected coordinates
....
Okay, give this a shot. It doesn't require parallel Lines only, but [at least in my testing in A2004] works with virtually any kind of intersectable objects. [I say only "virtually" any kind, because I didn't include or even test for (vla-intersectwith) capability for some of the more exotic things, that I wouldn't think one would ever want to dimension, such as Images, Wipeouts, Viewports, etc. And there may be other intersectable object types in newer versions, which you could add to the (ssget) filter list]. See the top of the file for some features it doesn't have yet, but that could be added.
@antistar wrote:Hi Kent,
Your code runs perfectly. That's exactly what I need.I have no words to thank your attention and help.A big thank you.
You're welcome. When I first looked at your animated image, I though sarcastically, "Yeah, right...." So it was fun to realize that there might be a way to do that, and then to work it out. I'm laying out a building right now with a wing at a non-orthogonal angle for which Qdim won't work [without changing the coordinate system, at least], so I'll probably have a use for the routine myself very soon.
It doesn't work with "just lines" -- it also works with Circles, Arcs, Polylines, Splines, Ellipses, Rays, Xlines.... But not Blocks. To get it to work with them would require a different approach, because the IntersectWith method doesn't work with Blocks.
You could conceivably have the routine Explode all Blocks, run what's already in it, Copyclip and then delete the new Dimensions, Undo back through the Explode command, and use Pasteorig to bring the Dimensions back in. But then there's the question of nested Blocks, and Xrefs.
Or, you could conceivably draw the temporary Line, and instead of the IntersectWith method, use something like a stepping (getpoint) with Intersection Osnap along the Line, to find all its intersections with things of any sort [since that would find those with elements of Blocks, too]. But that might find intersections that don't involve the temporary Line, depending on what else is around and the size of the Aperture box.
@Kent1Cooper wrote:It ... works with Circles.... But not Blocks. To get it to work with them would require a different approach, because the IntersectWith method doesn't work with Blocks.
....
Or, you could conceivably draw the temporary Line, and instead of the IntersectWith method, use something like a stepping (getpoint) with Intersection Osnap along the Line, to find all its intersections with things of any sort [since that would find those with elements of Blocks, too]. But that might find intersections that don't involve the temporary Line, depending on what else is around and the size of the Aperture box.
Here is one that does that different approach. It overcomes the last issue by checking that intersections found actually lie on the line before it includes them in the list. [Note that Blocks & Xrefs are not the only things that it now "finds" that the (vla-intersectwith) method in the other version did not; it also puts in Dimensions to intersections with, for example, extension or dimension lines of other Dimensions.]
Kent,
The routine has improved but the fact also scaling extension or dimension lines of other dimensions complicates its application.
I will continue using the previous routine dimensioning blocks "manually".
Thanks for the help.
Hello Kent Cooper,
It is already second time I requests for a help today --;
Is it possible to add dimension lines for only closed polylines? Thus, after the QDA command, it only shows the dimension lines in closed polylines.
My current drawing setting is that each close polyline is little apart from each other. So after QDA command, it adds dimension lines in closed polyline as well as dimension lines between the closed polylines.
Please refer to the attached sample.
Oncea again, thank you for your help.
Sincerely