Jump to content

from ss Text, mtext & block align to a poly or line


gilsoto13

Recommended Posts

My last request for a long time for you guys...

 

I have been trying to find the perfect routine for my company to achieve this:

 

I would to have a routine to select a line or polyline segment and then it will prompt me to select objects, and then this routine will filter only text, mtext and blocks, and will align them to previously selected line or polyline segment, each one by its own insertion point, for dummies the objects may be rotated 180 degrees from desired angle, so a prompt - backwards? would be better after the command shows us the result.. to give us the change to choose 180 degrees rotation with the "Y" answer.

 

I have found all of these things in 5 different files, the best one at this moment for us is the

 

ta.lsp, (vba) which aligns text, mtext and blocks to a line, but one by one and will not allow polyline segments.

 

then the rtt.lsp (vba) will allow us to select a polyline segment or a line, but the command will end after aligning only one object. It will not align blocks either...

 

And then we have the torient (from express tools in acettxt.lsp) which allow us to pick a selection set, but it will require the angle by picking 2 points and will rotate attdefs inside selected blocks, not blocks properly.

 

Can anyone make Santa Claus and help us increase our productivity reaching the objectives above with a brand new routine?

aligns.zip

Link to comment
Share on other sites

  • Replies 22
  • Created
  • Last Reply

Top Posters In This Topic

  • alanjt

    11

  • gilsoto13

    9

  • Lee Mac

    2

  • lpseifert

    1

Top Posters In This Topic

i keep meaning to do a little house cleaning and rewrite portions of this, but i just haven't the time. however, you are more than welcome to it. it will do everything you are asking for, and more.

select a line, pline, arc, block, piece of text, specify an angle or choose 0 rotation, even nested objects can be selected, then select as many blocks, text, mtext, multileaders as you like, and they will all rotate along that angle. lastly, the user is prompted with option to rotate everything 180 degrees (just in case).

Link to comment
Share on other sites

i keep meaning to do a little house cleaning and rewrite portions of this, but i just haven't the time. however, you are more than welcome to it. it will do everything you are asking for, and more.

select a line, pline, arc, block, piece of text, specify an angle or choose 0 rotation, even nested objects can be selected, then select as many blocks, text, mtext, multileaders as you like, and they will all rotate along that angle. lastly, the user is prompted with option to rotate everything 180 degrees (just in case).

 

 

What a beatiful lisp Alan.... That's exactly what I've looking for this since this monday....

 

I've been using the ta.lsp... but this is way better..

 

This is exactly as I wanted it, you've really worked a lot in this... maybe it will be part of Autocad commands in the future.

 

That's a lot, I will pass the message to other people... thank you for it. This week I also solved 2 other things our company was struggling with, one of them was to use one abbreviation for printing pdf regardless of current autocad version (I made 3 different abbreviations before) and the other thing was to update the scale of any type of block to current dimscale, now we have all solved thanks to this and other forums.

pdf.lsp

Bu.lsp

Link to comment
Share on other sites

i keep meaning to do a little house cleaning and rewrite portions of this, but i just haven't the time. however, you are more than welcome to it. it will do everything you are asking for, and more.

select a line, pline, arc, block, piece of text, specify an angle or choose 0 rotation, even nested objects can be selected, then select as many blocks, text, mtext, multileaders as you like, and they will all rotate along that angle. lastly, the user is prompted with option to rotate everything 180 degrees (just in case).

 

Is it possible to add the polyline to the angle detection objects? because program stops if a polyline is selected... I can see the polyline and lwpolyline in the type objects but doesn´t work for polys... maybe we can add the "convert" "selected entity" "Polyline" command in the middle so we can make it work with old fashioned polylines too, where could I add this line? or add the polyline type to make it work?

Link to comment
Share on other sites

Is it possible to add the polyline to the angle detection objects? because program stops if a polyline is selected... I can see the polyline and lwpolyline in the type objects but doesn´t work for polys... maybe we can add the "convert" "selected entity" "Polyline" command in the middle so we can make it work with old fashioned polylines too, where could I add this line? or add the polyline type to make it work?

old style plines? what on earth are you working with?

give me a sample drawing (i can't create one) with a non-LWpolyline and i'll see what i can do.

Link to comment
Share on other sites

old style plines? what on earth are you working with?

give me a sample drawing (i can't create one) with a non-LWpolyline and i'll see what i can do.

 

JAJAJA... I work on 2009, but I just have an option to create polylines by default, maybe some people have this option by default too... I am the support guy in a 40 or 50 people company in Mexico... but there's another major person responsible for creating our standards in our main USA office in Tucson. (M3)

 

So I just want to make sure anybody can use this beautiful lisp without stucking on pline objects. Check attached

check8.dwg

Link to comment
Share on other sites

JAJAJA... I work on 2009, but I just have an option to create polylines by default, maybe some people have this option by default too... I am the support guy in a 40 or 50 people company in Mexico... but there's another major person responsible for creating our standards in our main USA office in Tucson. (M3)

 

So I just want to make sure anybody can use this beautiful lisp without stucking on pline objects. Check attached

default? i didn't think you could even create a non-LWPolyline in the new cad versions.

Link to comment
Share on other sites

default? i didn't think you could even create a non-LWPolyline in the new cad versions.

 

I guess it willl be more complicated that just converting, since Polylines may have Z elevations different than 0... so I think the best option is just to add the "convert" to convert a Polyline to LWpolyline.

 

The weird thing is that this lisp works with a 3dpoly... (and aligns the objects to the 2d version of the segment selected) which is a Polyline type object... but doesn´t work with 2d polyline.. weird uuhh?

Link to comment
Share on other sites

Yup you can, I think it goes on the PLINETYPE sys var.

hmph, learn something new everyday; i think i'll stick with lwpolylines.

Link to comment
Share on other sites

incredible....

what is your IQ? and your connection speed also?

 

Your answer was there before I post the problem explanation...

Link to comment
Share on other sites

incredible....

what is your IQ? and your connection speed also?

 

Your answer was there before I post the problem explanation...

lol, probably lower than my connection speed. ;)

it was a minor fix.

Link to comment
Share on other sites

hmph, learn something new everyday; i think i'll stick with lwpolylines.

 

Ok, Let just thank you again... and finish this post, I'll let Walter Boughan know about you...

 

here is a zip with the public routines I use in case you want to search on it... I don't think you'll find anything new... but we never know.

 

I cannot post it here, is 1 mb so... try to download it from here

 

http://www.mediafire.com/?x411ycyuvtq

Link to comment
Share on other sites

Ok, Let just thank you again... and finish this post, I'll let Walter Boughan know about you...

 

here is a zip with the public routines I use in case you want to search on it... I don't think you'll find anything new... but we never know.

 

I cannot post it here, is 1 mb so... try to download it from here

 

http://www.mediafire.com/?x411ycyuvtq

no problem :) happy to help.

thanks for the goodies, i'll give them a search.

Link to comment
Share on other sites

  • 2 months later...
no problem :) happy to help.

thanks for the goodies, i'll give them a search.

 

Hey, Alan... I was wondering... actually I have been thinking about this for more than 2 months... ´cause it's not really necessary... but I think your lisp would be perfect again if it could allow us decide to re-rotate previously rotated objects 90, 180 or 270... and it's just because sometimes due to Polys or Lwpolys UCS angle doesn´t allow us to rotate our objects as desired and then we have to rotate them manually 90 or 270 degrees after using your lisp... how difficult would this be?...

 

maybe changing the prompt "Rotate/Flip Object(s) 180° [Y/N] "

 

for.... "1. Rotate 90° - 2. Rotate 180° - 3. Rotate 270° or "

 

and then allow us to pick 1,2 or 3 or just Enter to finish... could it be possible?

Link to comment
Share on other sites

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