AutoCAD Visual LISP / AutoLISP :: Flipping Linetype Text

Jul 25, 2012

I draw a linetype in my file with text in it (HW), I need to flip the text (Not the line itself) ...how is this done?

View 9 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Change VP Linetype

Nov 8, 2012

In our Structural department, we use a layer called S-35-WALL-LB to denote a load-bearing wall, and what the guys typically do when they are on the sheet showing the floor above, is dbl-clk the VP to activate model space, open the Layer Manager and change the VP linetype to HIDDEN to show the afore-mentioned loadbearing walls as walls under.

way to accomplish this through a viewport...but instead of using the Layer Manager, use a lisp routine I can link to a toolbar button where all the user has to do is dbl-clk the VP, press the toolbar button, and either it will convert the default VP linetype (continuous) for S-35-WALL-LB automatically, or get the user to select an object on that layer and it changes the whole lot?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Delete Linetype In Drawings

Nov 6, 2013

I have some drawing that contains PHANTOM2 linetype.

I can't delete this linetype from my drawings!

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Extract Linetype From DWG File

Sep 12, 2013

I've got a linetype that's part of our autocad template file and has been for so long that nobody around here even knows where the original line file is.

I need to extract the linetype out so that I can make some minor modifications.  I did do a search and found a nifty lsp routine from Paul Turvill.  (Here's the thread that pointed me there:  [URL] ..........

I ran it and it SEEMED to work.  All the linetypes in the file it created look good EXCEPT for the one I needed to extract. That one looks like this in the line file:
 
*TREELINE,Series of arcs used to indicate tree drip lines
A,0.0001,-0.0001,

The linetype DOES display properly in the dwg file (meaning lines drawn using it look good).

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Color And Linetype Modified By VPLAYER

Nov 2, 2011

How can I get the color that a layer has assumed in an specific viewport, and the same for an specific Linetype when it changed with an VPLAYER command

I found a function LM:GetOverrideData ( layer / data )  ;; © Lee Mac 2010

but return me the same data if I hask about an specific layer in all vports, and in one of them the layer color is modified.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Rename Layer And Change Linetype

Jun 24, 2009

I need to do three things in a LISP routine for around 200 drawings. First, I need rename lots of old layer to new standard layer name, like change layer name "CL-RAILWAY-0" to new layer name "CL-0".

Secondly, I need translate some layer to standard layer, like all the things on layer "CL-WATER-160" to layer "CL-0"

Last, change some linetype, like change linetype"CENTER" to "CENTERLINE". I can do all those things by "CHECKSTANDARD" manually, but I really need someway faster and easier.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Auto Change To Layer 0 And Linetype?

Mar 9, 2012

how to write a lisp that when i activate it, it will change all the objects in the drawings to be change to "Layer 0" and all linetypes "Dashed" change to be "hidden"...

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Converting Objects Of Certain Linetype To A New Layer

Oct 26, 2012

I would like converting all objects that has forced linetype to be on a linetype layer.

So if there are objects that have forced linetypes - dashed/hidden/phantom, etc., those entities would be moved to a linetype layer based on their forced linetype.   The entities would all be changed to color bylayer, linetype bylayer.

So if there is a rectangle that is sitting on an EQUIPMENT layer, the routine would put that rectangle on a new layer called DASHED and change its forced linetype to BYLAYER.

Lastly, once that's done, the next and final step is to locate a the existing layers with matching linetype - say, OBJECTS with DASHED as a linetype, and merging it to that layer.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Block Retaining Wall Linetype

Jun 12, 2009

Linetype code that represents blocks in a retaining wall, lets say for instance Keystone type blocks?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Prevent Dots On End Of Custom Linetype?

Sep 15, 2011

I have a custom linetype that's just a series of arrows I want to use to show the flow of a ditch. I've played around with this thing for a while and have these dots at each end of the line that shows up when I print.

Is there any way to make this linetype without the dots at each end? the actual files for the line type.

FLOW.lin
*FLOW,A,0,-.002,.148519,[FLOW,FLOW.shx,s=1],-.449481

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Create Linetype With Double Lines

Aug 12, 2012

I want to know how to create linetype with double lines one rectangle empty and other with solid in autocad(i am using autocad 2004)I tried by express tools with command mkshape (and then makelinetype command) but it is coming without solid, is it possible in autocad by using Autolisp, see attached dwg, name is linetype_ds

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Getting Shapes In Custom Linetype To Reside In Drawing

Sep 17, 2013

I have a client who requested some complex custom linetypes. (line - shape - line)

I built the shapes and stored them in my ltype.shp file, and compiled that to ltype.shx. Then I added the custom linetypes in my acad.lin file. So everything works on my machine with no problem. However, when I send the drawing to someone else, the linetype works, but the shapes are left out. My guess is that since her ltype.shx file does not contain my new shapes, the lines are just drawn without them.

Is there a way that I can have those linetypes, complete with shapes, ride along inside/embedded the dwg file?

And before you ask, no, it's not an option to provide the client with the shx file that contains these shapes. I'm one of many different people in many different companies that might work on these drawings in the future and there's just no way that they'll be able to send an shx file along with the drawing every time someone new needs to work on it.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Force Change Linetype And Layer To Preset Preference?

Mar 7, 2012

Is there any way with a click of a button by using LISP, it will change all the selected object to be changed to a pre-set layer...

Example, after i select a certain entities in a drawing, with LISP, it will change all the object to layer "0"?

Additionally, u also need it to change all selected entities that are in "dashed" linetype to be change to "hidden" linetype..

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Color And Linetype Of Xref Nested Entity

Aug 22, 2012

I have a Lisp that I have been working on with some folks in the office, and i feel like i am close, but i am not getting the cigar. The idea would be to have the lisp allow the user to select a nested x-ref entity, and change the color and linetype of the selected layer, similar to the old "LAP" command (I know it is a dinosaur, but I still miss it). I seem to be doing swimmingly, code I have quasi-plagiarized. It seems to crap out where i try to pass the selected linetype back to the layer. I get the nastygram "Command: ; error: no function definition: GETLINETYPE" right after selecting the linetype from the dialog.

Code below...

x(defun c:CX (/ Sel EntList DataList cnt Num ClrNum EntData)
(if (setq Sel (nentsel "
Select object to change layers color and linetype: "))
(progn

[Code]...

HP Elitebook Workstation
Windows 7

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change All Block Element To Layer 0 Without Changing Color / Linetype

Sep 3, 2013

I have too many blocks with specific layers inside.

develope lisp can change all to layer 0 but keep color and linetype as it is.

I will use this as a part of script to change multiple block.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Existing Text To Keyboard Entry Text

Jun 21, 2012

I have two attributes "REVN" and "REVD" in a block "ATT" that I would like to change (globally preferably) to the following.

(1) Existing text to keyboard entry text.

(2) Colour from existing to 10

I am a bit lost in the (command "-attdef" .......)

(defun c:atc ()
(setq rev (getstring "Please enter review"))
 (setq dat (getstring "please enter date"))
 (command "-attdef" .."ATT".."REVN"....."c" "10")..)
 (command "-attdef" .."ATT".."REVD"....."c" "10")..)

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Text Won't Wrap In Text Window?

Oct 8, 2013

When I click on an object to retrieve it's extended data, the data keeps writing to the right, it does not return to the next line, when the text approaches the end of the screen.  Very difficult to analyze information.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Text Width Before Text Creation

Mar 2, 2013

I want to know is there any formula/calculation for the width of text object before creation/insertion? At now I used approximated width size via a simple .
 
(Defun GetStrWidth (str H W) (fix (*(* H W) (strlen str))));;usage: (GetStrWidth "This is a Text." 2.5 0.8);;H: TextHeight; W: width factor. 

I know that for the existed text in drawing I can use textbox command, but for the texts that has not been created, what can I do? Is there any formula/calculation depends on font name, text height and width factor?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Move All 3.5mm Text To Layer Text 3.5

Sep 12, 2012

We are using autocad 2012.

Is there a way to move all 3.5mm text to layer text3.5 and move all 5mm text to layer text5.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Find All Text In Selected Items And Swap Text

Oct 25, 2012

A program that prompts:"select objects:" then I can select some objects like as text, line, circle,... after that program find all texts in selected items and swap text

swap means:   xxx/yyy ===> yyy/xxx ;    "/" is a divisor

swap function for one text is here:

(defun c:swap ( / pos ent el txt)
(vl-load-com)
(if(null #div#)(setq #div# "/"))
(setq #div#
(if(=(setq tmp(getstring(strcat "
Divisor character: <"#div#"> ")))"")
#div# tmp
)

[Code]....

but I want a program to prompt me like this:

(prompt "Select objects:")(terpri)
(setq a (ssget '((0 . "TEXT"))))

and gets divisor char </>:

after that:

(setq n (sslength a))
(repeat n

....

)

repeats n times, n=number of texts in my selection

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Using TEXT Not MTEXT To Create Multiple Lines Of Text?

Oct 4, 2011

3rd party tool which didn't match our scaling needs the file is a fas so I have tried to reverse engineer the whole function using trial and error. The following code works perfect except we need multiple (x amount) lines of text I have at current the M txt function which mimics and is effective for today however we need all lines to be individual.

I’m playing round with a loop but how to achieve my need..He had a 3rd party tool which didn't match our scaling needs the file is a fas so I have tried to reverse engineer the whole function using trial and error.

The following code works perfect except we need multiple (x amount) lines of text I have at current the M txt function which mimics and is effective for today however we need all lines to be individual.
 
;Starting lisp program...(defun C:REDtext ();Creating Layers (if non existant)...(command "layer" "m" "TEKST-1.5mm" "lt" "continuous" "" "c" "1" "" "");Memorising previous layer...(setq MYOLDLAYER (getvar "clayer"));Setting requierd layer...(COMMAND "LAYER" "SET" "TEKST-1.5mm" "");Setting variable "MYHEIGHT" to "DIMSCALE" x 2...(setq myheight (* 2 (getvar "DIMSCALE" )));Requesting and storing usser defind point...(setq MYPOINT (getpoint "Start punt :")); Requesting and storing user defind text...(setq MYTEXT (getstring T "Nieuw tekst :"));Placing text...(command "text" MYPOINT MYHEIGHT "0" MYTEXT); Restoring previous layer...(setvar "clayer" MYOLDLAYER);Closing lisp program...)

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Select Multiple Text To Heal Instead Of Single Text?

Aug 1, 2013

this code is used to fix specific font but its problem that it will prompt you to select single text 

i need to make it to select multiple text so it saves me a lot of time, 

;;; Process Individual request
(defun cht_ProcessIndividual ()
(setq sslen (sslength sset))
(while (> sslen 0)
(setq temp (ssname sset (setq sslen (1- sslen))))

[Code]...

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Changing Text Formatting Style Inside All Text Contents

Aug 4, 2013

I have inside every text,Mtext contents different text style like Arial_1 , Arial_2.

How i can give all the contents inside one style ? the normal procedure i will enter inside text to enter editing mode and changing text format style one by one. I  want it once.

I want to save my routing of entering every text to change its content text style.

(Notice:select all from outside without editing mode will not do the job)

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Get Z Value From Text

May 10, 2012

I have text objects with the same Z value and I will select as follows:

(setq sstxt (ssget '((0 . "TEXT")(8 . "APS-text"))))

How to store this value in another variable "zvalue" to apply to:

(command "change" "select text objects" "" "_p" "_e" zvalue "") ?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Text With Bounding Box

Jan 13, 2012

I use the bounding box (vla-getboundingbox) to assess parameters of blocks.  These blocks have text on some of the faces that extends beyond the simple dimensions of the blocks themselves.  I'm wanting to have bounding box ignore the text and can't sort it out.  I've tried putting the text on a separate layer and turning it off and freezing it.  

 I've considered looking at sub entities and filtering out the text but I don't know if there is a solution here or not.  

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Text Files From MDB

Aug 29, 2012

I have an mdb database, with one table called MATRIX. That table has seven relevant fields, see attachment. What I want to have is for every language an txt file.

Like for example:

DUT.txt
2BK1;BATTERIJKAST sBk
2RK1;REMKAST sBk

and so on

ENG.txt
2BK1;BATTERY CUBICLE sBk
2RK1;BRAKE CUBICLE sBk

and so on

ITA.txt, the same
DEU.txt, the same
ESP.txt, the same
FRA.txt, the same

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: ID Duplicate Text

Jul 24, 2013

This is a routine that draws a line between duplicate text.

Would it be possible to have the line as bold red p-line so that its easier to identify.

;; This AutoLISP routine examines all the user-selected TEXT and MTEXT items,
;; and draws a line on the current layer between any two that have identical
;; string values.
;; Leading and trailing blanks spaces are ignored.
;; %% modifiers, like %%u, are not ignored.
;; Upper- and lower-case differences are not ignored.

(defun c:fdt () ;;Find Duplicate Text

(prompt "Select text items to examine: ")
(setq ss (ssget '((-4 . "<OR") (0 . "TEXT") (0 . "MTEXT") (-4 . "OR>"))))

(setq n 0)

[Code]....

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Alphabetize Text

Oct 7, 2013

I've looked around several places for a LISP that will alphabetize existing text. I cant seem to find what I need. I am looking for a routine where I can manually select text in a given order to get the outcome of AA,AB,AC,AD, or BA,BB,BC., etc.

I've attached a drawing to better explain what I am looking for. I do not know how to write LISP routines, but I know a little to be able to modify an existing one.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Leader With No Text

Nov 27, 2011

I'm trying to create a leader with no attachments. Code below. But I can't seem to shut of the Annotation Dialog.

(setvar "cmddia" 0)

(vl-cmdf ".Qleader"     "S"     "A"     "N"     pt1 pt2   ""  )

Also I am trying to create a leader with text that is aligned and above the leader line.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Arc Text Exploding

Aug 16, 2011

I have encounter some text exploding problem. As shown in attachment, I would like to know if there any possible way I can explode the text into polyline or single line and maintain it within the position and style?

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Substituting Text With Attribute?

Apr 29, 2013

I run into some issues where i need to change an attribute based on where a block is located on a drawing.  I started this routine to select the block, and then select the text that I want to change the block attribute to.  It seems like everything is working up until this point.  What I want to do is then replace the first selected with the second selection.  How would I go about doing that?  here's my code so far:

(defun C:uf ()
(if (setq fuse (nentsel "
Select Fuse Attribute: "))  
(progn     
(setq en (car fuse))    
(setq enlist (entget en))      
(setq fuseatt(cdr (assoc 1 enlist)) )   )  )      
(if (setq mt(car (entsel "
Select Text: ")))  
(progn          
(setq enlist2 (entget mt))    
(cdr (assoc 1 enlist2))     
(setq wiren(cdr (assoc 1 enlist2)) )     )          )
)

View 8 Replies View Related







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