Lisp routine for rotating block and objects but leaving the text horizontal

Lisp routine for rotating block and objects but leaving the text horizontal

Anonymous
Not applicable
1,864 Views
10 Replies
Message 1 of 11

Lisp routine for rotating block and objects but leaving the text horizontal

Anonymous
Not applicable

I wasnt sure if someone has a lisp routine that when you rotated a block the text within the block would stay horizontal and readable. I had this at a different company but i cant remember how it was written. 

0 Likes
1,865 Views
10 Replies
Replies (10)
Message 2 of 11

braudpat
Mentor
Mentor

 

Hello from France

 

Welcome to the Autodesk / AutoCAD Forums !

 

Are speaking about Attributes inside Blocks or about Texts/MTexts inside Blocks ?

 

Regards, Patrice

 

Patrice ( Supporting Troops ) - Autodesk Expert Elite
If you are happy with my answer please mark "Accept as Solution" and if very happy please give me a Kudos (Felicitations) - Thanks

Patrice BRAUD

EESignature


0 Likes
Message 3 of 11

Ranjit_Singh
Advisor
Advisor

I believe that can only be done with reactors or a dynamic block.

0 Likes
Message 4 of 11

ASCunningham
Collaborator
Collaborator

If you have attributes in the block this will work

 

(defun attrot0 ()

(command "attedit" "" "" "" "" "l" "a" 0 "" )

0 Likes
Message 5 of 11

Anonymous
Not applicable

I thought it could be something for all text, (mtext, text, blocks with text and attribute) Ive used the command before just dont know how it was written to accomplish it.

0 Likes
Message 6 of 11

Ranjit_Singh
Advisor
Advisor

Using a LISP will make things unnecessarily complicated. See post 3. You will need object reactors. Using dynamic block is  much easier.Rotate_block_but_attributes.gif

Message 7 of 11

pbejse
Mentor
Mentor

@Anonymous wrote:

I wasnt sure if someone has a lisp routine that when you rotated a block the text within the block would stay horizontal and readable. I had this at a different company but i cant remember how it was written. 


This can be achieved with Annotative Text Style

 

annotative.PNG

 

Try the attached block [ Stays in zero rotation on view.dwg ]

 

or the .NET lessons for  "KeepStraight"  found at -->"My First Plug-in Training 

0 Likes
Message 8 of 11

braudpat
Mentor
Mentor

 

Hello from France

 

If we are speaking about Attributes INSIDE Blocks, then the BEAUTIFUL Routine "Rot0__SRot0" from Patrick_35 (a French developper very active on the french CAD forum: cadxp.com) will be the solution !

 

The VLisp routine "Rot0__SRot0" uses REACTORS to solve this problem !!

 

So on your keyboard:

ROT0 <Enter>

and then ATTSYNC <Enter >

N <Enter>  (N for Name

* <Enter>

NOW all your attributes are horizontal !

 

To roll back to standard situation :

SROT0 <Enter>

and then ATTSYNC <Enter >

N <Enter>  (N for Name

* <Enter>

NOW all your attributes have normal rotation !

 

I hope this can help you !?

 

 

***** I imagine that from THIS Patrick_35 Routine a Good Lisp/VLisp developper

***** can derive a NEW version for TEXT/MTEXT/etc and an other ONE for Blocks (INSERT)

*****

***** The result will be "a little bit similar" from Annotative Concept

***** But from my ViewPoint, it could be interesting to have it !?

 

 

Thanks to @patrick_35, Regards, Patrice

 

 

Patrice ( Supporting Troops ) - Autodesk Expert Elite
If you are happy with my answer please mark "Accept as Solution" and if very happy please give me a Kudos (Felicitations) - Thanks

Patrice BRAUD

EESignature


0 Likes
Message 9 of 11

pbejse
Mentor
Mentor

@pbejse wrote:
Try the attached block [ Stays in zero rotation on view.dwg ]

 


I just realize what I posted in not annotative at all Smiley LOL

 

 

Anyways, I think it only works for attributes.

 

 

0 Likes
Message 10 of 11

braudpat
Mentor
Mentor

 

Hello @pbejse

 

French Humour: I know that you belong to the ACAD AutoLisp Legend Team but ...

 

You have posted a 2018 Format DWG ...

 

Are you sure that @Anonymous has a 2018 ACAD version !?

 

Regards, Patrice

 

Patrice ( Supporting Troops ) - Autodesk Expert Elite
If you are happy with my answer please mark "Accept as Solution" and if very happy please give me a Kudos (Felicitations) - Thanks

Patrice BRAUD

EESignature


0 Likes
Message 11 of 11

pbejse
Mentor
Mentor

@braudpat wrote:

 

 

You have posted a 2018 Format DWG ... 


Guess I did post 2018 format Smiley Very Happy

 

Now it's 2013 format. But like i said, only attributes.

0 Likes