AutoCAD 2010 :: Lisp Routine To Rotate Text To Zero Angle

Aug 28, 2013

I'm looking for a lisp routine that allow me to select a text object that is rotated to anything other than zero, and it will change the text object to zero rotation and while still in the command allow me to place the text object on the screen.

I have a routine that is similiar called RT180 but it just rotates whatever text object you select 180 degrees from its current rotation, but I can not figure out how to modify it to rotate to zero rotation angle.  What I like about RT180 is that you select your text it rotates it on the spot and then lets you pick a spot to place it.

View 3 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Routine To Rotate Text

Sep 18, 2013

I was wondering if there is a setting somewhere that could hold my snapmode settings after I use a lisp routine. I found a lisp routine to rotate text and have noticed that everytime I use that lisp command I lose my osnap settings....

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Larger Routine To Create And Rotate Text Based On Object Selected

Dec 29, 2011

the expression in question is part of larger lisp routine to create and rotate text based on the object selected and the viewtwist variable (we use dview twist to rotate our views when needed)

So the expression in question:
(< (/ pi 2) ang (* pi 1.5)
where ang is the total angle used to determine proper rotation of the text.

Now the problem. In most cases where ang = 90 (or 1.5708 radians) this works fine. the two exceptions i have encountered

in testing are a line at 70 degress, viewtwist 20, and line at 50, viewtwist 40. For whatever reason at these two conditions the expressoin evaulates True instead of nil and rotates the entire text object incorrectly (180 degrees). So question is how exactly is this being evaluated? i know its comparing ang (* pi 1.5) to (/ pi 2). is there some sort of rounding error? or maybe the expression needs a wee bit more definition? attached image and full lisp routine for reference of what is happening, blue text is angle of the line as created by routine at viewtwist 0.

View 1 Replies View Related

AutoCAD 2010 :: Lisp Routine And Keep Getting NIL

Dec 4, 2012

I have a lisp routine and I keep getting NIL. I want it to draw a door and I want to be able to move it.

(defun c:door ()
(DEFUN dtr (A)
(* PI (/ A 180.0)))
(setvar "CMDECHO" 0)
(DEFUN INFO ()
(setvar "OSMODE" 0)
[code]....

View 1 Replies View Related

AutoCAD 2010 :: Way To Put Mleader Into LISP Routine

Aug 16, 2012

I put mleader into a LISP routine and it is doing the text attached to it only in the command line instead of in the drawing is ther a way to put mleader into a LISP routine and have it do the same as when you just type in mleader?

View 2 Replies View Related

AutoCAD 2010 :: Lisp Routine Fails In 2012?

Jan 24, 2012

I am using a fairly old Lisp to generate section arrows, started using this in 2000 and up until 2011. Since we have installed 2012 the routine does not work correctly, after inserting block with attributes instead of bringing up dialogue box it inserts next line of string in to the dialogue box. I have attached lisp routine and blocks

View 6 Replies View Related

AutoCad 2D :: Cannot Rotate Dimension Text To Desired Angle

Sep 13, 2013

I'm making this diagram of the load condition acting on tunnels to explain a Japanese set of equations that are used for the structural analysis for tunnels:

load condition for EEM.jpg

But, there is one problem I have. I'm trying to set up the text for the dimension between the water table and the tunnel "Ha" to look horizontal.

However, if I click on the properties box and write 90 in the rotation box right next to where it says "text rotation," the dimension text does not rotate 90 degrees; if instead I try to rotate it 180° then it only rotates 90° (and in the opposite direction) instead of 180°. It doesn't matter how many degrees I choose, it won't rotate my dimension "Ha" to desired angle to make it look horizontal.

OK I know it's hard to explain my problem with just writing, so I've posted a few pictures:

In this one, the dimension is at 0°; I've only opened the properties box to attempt and rotate it: no rotation.jpg

Now I write 90 in properties box but the dimension text does not rotate at all; it remains at 0 as it is shown in the following image: 90 & no rotation.jpg

Next I try to rotate 180, just to see what happens; and it does rotate (only 90 degrees!): 180 rotates 90.jpg

I finally try to rotate the text 270 just to see if it rotates to desired angle and it does rotate (180 degrees from original position). As shown below:

270 last try.jpg

It doesn't matter how many degrees I choose, I cannot make it look horizontal.

How can I set up my dimension text "Ha" to look horizontal?

View 6 Replies View Related

AutoCAD 2010 :: Lisp Routine To Change Company Logos

Apr 17, 2012

We are trying to update our company logo on hundreds of autocad drawings, lisp routine or a better way to get this update.

View 5 Replies View Related

AutoCad 2D :: Rotate An Object To Match An Angle Without Knowing The Angle?

Oct 5, 2011

Is there a quick way to rotate an object to match an angle without knowing what the angle is? I am using AutoCAD 2011 now. I was using 2007 and I had an add on command the would rotate an object using a base point and picking the two lines that make up the angle, and it would match the angle you wanted. I can not get that command to load in 2011.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Routine To Scale Text Objects

Jan 8, 2014

Any Lisp Routine to scale text objects a certain value and have the program actually scale each text object as you pick them.

The change text height using the Properties function does not work for what I need because the objects I need to scale are Mtext objects with Background Mask, and when you use the Properties function to change their text height it messes up the background mask so that you have to select each text entity and stretch the mask area smaller or larger, but if you use the scale function it scales the background mask as well so the background mask coverage is still the same.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Getting Routine That Will Sum Selected Text Values?

Jun 2, 2004

lisp routine that will add together the values of text entities? For instance, if I have a big parking lot and each section is labeled with the number of spaces, I could pick the texts and it would add all the numbers together to give me a total. Right now I export to excel to do this. I have quite a few situations where this would be handy, not just for parking spaces, so I really just want a lisp that will add all my selected numbers.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Routine To Substitute Text To Blocks At Point Location

Aug 17, 2012

i found this valuable script Lisp routine to insert blocks at point locations and want to modify it but i do not know much about lisp ...

what i want is :

1) script start and asks for a Block Name (in this case QPP1, QPP2, QS, QE, ect)

2) the user picks existing text  

3) the script reads the value existing on this text an put it in a variable

4) then erases the pre picked text

5) inserts the block chosen

6) changes block value to number value pre-read

since it do almost all steps except for step 3 and 6

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Using Entmod To Rotate Text In Multileader

Jun 10, 2010

I would like to use the entmod method to rotate the text in a Multileader object. Reading the DXF code tells me the dotted pair of 42 seems to be the rotation angle, but entmoding that does nothing. Obviously I don't know how to modify this complex object.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Write A Lisp Routine That Invoke The Mleader Command

Oct 11, 2012

I'm trying to write a lisp routine that, when I invoke the mleader command, osmode is set to "nearest" & orthomode is set off. I then would like the original settings to be returned.

attached is what I have written so far:-

View 4 Replies View Related

AutoCAD 2010 :: Rotation Angle Of The Text And Mtext Is Different In Properties Palette

Dec 19, 2012

I've rotated my UCS 45° at Z axis and create a "mtext" and "text".

But when I check the angle of the "mtext" in properties palette is 0°.And the angle of the "text" is 45°.

why AutoCAD showing different angle for both objects which are in the same direction ?

[URL]

View 1 Replies View Related

AutoCAD 2010 :: Paper Space Plotting - Text Rotate To 90 Degrees

May 18, 2012

I've created a drawing in model space, added text in paper space. When I go to plot the drawing the text is rotated 90 degrees instead of staying oriented the way I added it. There must be some setting that I am missing somewhere!

View 9 Replies View Related

AutoCAD 2010 :: MText Area - Adjust Single Line Text So That End Of Sentences Make Angle

Apr 5, 2013

I use Mtext quite a bit and I am trying to convince others in the office that it's a good thing (versus single line text in long paragraphs).  One of their concerns in the shape of the Mtext.  For instance, when you use Mtext, you type into a nice rectangle that you can change the size of.  What they have to do on occassion is instead of having a nice rectangle of text, they have to make it like a triangle.  So in this case, single line text can be adjusted so that the end of the sentences make an angle.  

Is there a way to do this using mtext?  Or is there an lsp that will work?

View 2 Replies View Related

AutoCAD .NET :: Rotate UCS About 90 Angle Counter Clockwise And Zoom

Apr 9, 2013

I have this

Matrix3d cur = ed.CurrentUserCoordinateSystem;
Vector3d x = new Vector3d(1, 0, 0);
Vector3d y = new Vector3d(0, 1, 0);
Point3d o = new Point3d(0, 0, 0);
[Code] .....

 Code is rotating well my model, but it's zooming to bad point. I want to zoom to the point from previous view, so I'm transforming it by new UCS - unfortunately something is going wrong (it's not this point what I want).

View 1 Replies View Related

AutoCAD Inventor :: Use Rotate At Angle Command Outside Of Custom View Environment

Oct 1, 2012

Is there any way to use the "Rotate at angle" command outside of the "custom view" environment?

Is there actually any technical reason why the controls in the attached screenshot are not available in the Studio and normal modelling environments?

View 7 Replies View Related

AutoCAD Map 3D :: Lisp Routine Not Working In Version 11?

Jul 25, 2012

We are moving from AutoCAD Map 3d ver 10 to ver 11.  There's a lisp routine I use all the time and it doesn't seem to want to work in the newer version 11. this routine is supposed to fill but like I said doesn't work in ver. 11.

View 1 Replies View Related

AutoCad 3D :: Lisp Routine To Flip All Faces?

Nov 24, 2011

We have just finished modelling hundreds of pits/manholes in 3d, to import into 12d as required by our current project.

After importing into 12d we have realised that all the faces are back to front as the dark edges are facing outwards, and the light edges are facing inwards on the pits.

Is there a way to globally flip, or perhaps a lisp routine to flip all the faces?

View 0 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Stuck In A Routine 2?

Nov 21, 2013

Basically, the routine asks for the user to choose the hatch type (Retirer/Percer), then the layer (Defpoints/Select/Current) and finaly the type of the object to draw (Polyline/Rectangle). My original routine has also a Circle and a Boundary options, and an Error trap to reset the variables but I will keep it simple for the purpose of my issue. 

So, my issue is: when I choose the type of object to draw, it draws just one of it and the routine ends. I would like to have something that "says" to the routine that I want to keep drawing that object (Polyline or Rectangle) and putting the hacth inside until I do enter and then the routine goes to its end.

View 9 Replies View Related

AutoCad :: Lisp Routine For Creating Item Balls?

Aug 29, 2012

Lisp routine for creating item balls with an arrowhead and a one to two digit number in the balloon?

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Force A Routine To Be Run

Dec 10, 2012

I have created an acad.lsp file in where I want to arrange all our company settings. I've stored it on the network to make sure everyone will use the same one and when updates take place I don't have to run past all pc's to change it. I've set everything in the deployment package but users can still change it when they reset their profile. Plus some pc's are already installed with AutoCAD before creating the lisp routine, how can I enforce the support directory to check on the network for the acad.lsp each time?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Use Selection Set For Routine?

Oct 16, 2013

with the mouse I can select objects on the screen and then start a command that uses these objects.

How can I perform this in lisp?

I can create my selection set, that's no problem, but how can I 'make it active'  for an external function?

(ssget "_C" p0 p1 '((0 . "TEXT")))
???
(c:txtexp)

View 2 Replies View Related

AutoCad 2D :: LISP Routine To Radial Line Hatching

Mar 16, 2011

Easy way (or LISP routine) to do radial line hatching in AutoCAD 2006. What I mean is the ability to hatch an object, such as a ring (or doughnut) such that the hatching lines are in between the two rings, and are all perpendicular to the circle. Even better would be a generic routine to allow hatch lines to follow arcs (but that would be dreaming too big for now). Perhaps there is some sort of sweep technique that could be exploded into lines? All I need are the lines, actually.

View 2 Replies View Related

AutoCad 2D :: Lisp Routine For Making Points Selectable

Aug 22, 2013

I have got points from a GIS software into AutoCAD, the problem is that I am unable to draw a polyline between the points to get a distance between the points. Anu lisp routine which can convert the points to make them selectable. I have attached the drawing I am working on for those of you who want to have a go at this one.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Routine To Check Overlap

Aug 12, 2012

I want autolisp program to check overlap like in closed or open polyline with any other entity in the drawing, whether other entity is overlapping inside the polyline or not, i am beginner in autolisp and want to know exactly which functions are used or the program itself Also if possible to check circular overlap of one polyline with itself.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Routine For Rotating Lines

Jul 23, 2013

LISP routine for rotating lines so that text in linetypes always reads from left to right?

I use the QUERY command to create basemaps and often the lines that are imported read upside down or backwards or however you prefer to look at it.  Most often, if I look at the XY coords of these backwards lines, the End X coordinate is of a higher value than the Start X coordinate.

Looking for something that would compare the two X coordinates of a line, do some sort of an IF Start X > End X, and if its true, store the XYZ coords of the Start and End in some variable, and swap them.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Routine To Replace All Blocks

Oct 5, 2011

I am looking for a routine that will replace all blocks named "DgnMisc_nodepoleind" with a block named "DgnMisc_nodepoleind2" keeping the insertion point. I could use (command "-insert" "DgnMisc_nodepoleind=Y:/ACAD2007/DA settings/Library_new_scale1/DgnMisc_nodepoleind2.dwg" NIL ) but my problem is that the block I want to replace is used on two different layers and I only want to replace the ones on layer "TPSYM01".

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Routine For Page Setup

Jan 9, 2013

I found a lisp routine on the internet to change page setups on multiple layouts. The lisp worked but on some of the layouts it moved the viewport off the paper background (see attached). The layouts print fine but the only way to get the viewport back on to the background is to open the page setup and click modify, then ok and close. I tested this on a .dwg that I had saved to my computer rather than on one in  the main folder but I would like to do this to to all are maps since our IT decided to rename our printer and now all pages setups are no good.All I know about lisp is how to run one.

;; Copy current layout page setup to all layout tabs
(vl-load-com)
(defun c:CPS (/ Adoc Layts clyt)
  (setq aDoc  (vla-get-activedocument (vlax-get-acad-object))
 Layts (vla-get-layouts aDoc)
 clyt  (vla-get-activelayout aDoc)
  )
  (foreach
     itm
        (vl-remove (vla-get-name clyt) (layoutlist))
    (vla-copyfrom (vla-item Layts itm) clyt)
  )
  (princ)
)

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved