AutoCAD Visual LISP / AutoLISP :: Change Point Label Style

Oct 1, 2013

I am trying to use autolisp to change the point label style in autolisp. Mostly teach you how to do it manually, I not sure there is a way to do it in autolisp.

View 5 Replies


ADVERTISEMENT

AutoCAD Civil 3D :: Modify Point Label Style Using Visual Lisp

Feb 19, 2013

I am having trouble drilling down to the object that contains the point label components.  Specifically, I would like to access values such as Anchor Component, Anchor Point, Text Height, X Offest, and Y Offset for the various components of the Point Label Style.  I am able to get the Point Label Style by name (object dump below) but I don't know how to get at the components that I want to work with.

; IAeccPointStyle: IAeccPointStyle Interface; Property values:; Application (RO) = #<VLA-OBJECT IAeccApplication 000000004965fbc0>; CreatedBy = "Cooper"; CustomMarkerStyle = 0; CustomMarkerSuperimposeStyle = 0; DateCreated (RO) =

[Code]....

View 2 Replies View Related

AutoCAD Civil 3D :: Change Point Label Style Using AutoLISP

Oct 2, 2013

I did some search and got some code from 2009 post which not really working for me. Since I am not a pofr for autocad civil3D and just staring to learn how programing with autolisp, I am having trouble to debug the code:

(defun xp()(setq sset1 (ssget "X" '((0 . "AECC_PARCEL_SEGMENT")))) (COMMAND "EXPLODE" SSET1 "")
if (= (setq ss (ssget "X" '((0 . "AECC_COGO_POINT")))) nil)
(setq ss (ssget "x" '((0 . "AECC_COGO_POINT")))) );
FILTERS UNCLOSED POLYLINES(defun c:changestyle()
(setq xlabel (vlax-ename->vla-object (car (entsel))))

[Code] ....

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Text Style

Dec 16, 2013

I am trying to put together a LISP that changes the font of two text styles. One bing  named "Standard", and the other "WD".

This is what I have so far...

(defun C:CHANGESTYLE (/ entities len count ent ent_data ent_name new_style_name)
(command "STYLE" "Standard" "Romantic" "" "" "" "" "")
(setq entities (ssget "X" '((0 . "TEXT")))
len(sslength entities) count 0);

[Code]....

 I couldn't figure out how to select mtext and text all in one swoop, so i ran it twice 

Now, when i run this code, i get the following error "lselsetp nil".

CADMASTER TECHNOLOGIES, LLC
[URL]....

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Change Plot Style

Feb 21, 2001

Is there a way for me to change a layers plot style from one to another with LISP?

We use named plot styles, STB's not CTB's.

I want to be able to create an icon that will change all layers with the plotstyle "normal" to "black". Is this possible with lisp?

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Plot Style Table?

Oct 3, 2012

Is it possible to create a lisp that would change the plot style table?  I don't know of any variable to type to change that.  We convert drawings from Solid works to AutoCad and use the basic monochrome plot style.  I'd like to easily change that since the act of doing that is repeated many times.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Font Style Of 1 Text Item?

Sep 9, 2010

im my current coding project im attempting to change the font stlye of 1 text item

i tried used the simple method of

[code]

(command "STYLE" "simplex" "ARIAL" "" "" "" "" "")

[/code]

however, using this changes the text's font in the whole drawing

i searched the forums here and everything i found either didnt work or changed all the text.

is there a more elegant way of doing this with just a selected text item and not the text in the whole drawing?

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Changing Text Style Used By Table Style

Jun 29, 2012

I am looking for a way to change the text style used by a table style with Visual LISP.  So far I have been able to get the IAcadTableStyle object from the acad_tablestyle dictionary, but there is no property for text style.  Is this even possible?  Code and results are below.

(defun DumpTableStyles ()
(setq dict (vla-get-dictionaries (vla-get-activedocument(vlax-get-acad-object))))
(setq TableStyles (vla-item dict "acad_tablestyle"))
(vlax-for TableStyle TableStyles
(vlax-dump-object TableStyle)
)
)

[Code]....

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Toggle Between Customized Old Style Menus / New Style Workspaces?

Nov 13, 2011

Is there a way to toggle between customized old style menus and new style workspaces?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Opening Drawings With Default Visual Style Set To 2D Wireframe

Oct 7, 2013

Is there a way to programatically set a visual style before a drawing actually opens?

We have some huge models and people seem to forget to change their visual styles back to 2D wireframe before saving and exiting drawings.  Some models will crash on some workstations when trying to open in a rendered mode.

I found a lisp with a function that looked to set viewport visual styles.  But it does not seem to be supported anymore. --> (vla-put-VisualStyle vport 1)

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Extract Label From New WCS

Jun 4, 2013

I need a lisp routine that will allow me to pick a polyline and label with azimuth and distance (direction-north, clockwise) of a new WCS.

Is there any code that extract information for a new WCS?

View 9 Replies View Related

AutoCAD Civil 3D :: Change Text Color In Point Label Style Based On Variables

Sep 27, 2013

Is there a way to set up a custom Point Label Style that will change the text color if the information entered meets particular criteria?  I will be entering sample measurements taken on two (2) different dates, but if the sample data is greater than 1.0, I want it to show up a different color.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Label Block With Effective Name

Apr 22, 2013

Using this  

 (setq nblock (vla-get-Effectivename(vlax-ename->vla-object block )))

I get the effective name dynamic block.
 
(if (nblock (= "test_block"));;;--->Which is the correct form? (command "_insert" "LABEL" pt1 "" "" "") );end if (if (nblock (= "test_block2"));;;;Which is the correct form? (command "_insert" "LABEL2" pt1 "" "" "" ) );end if repeat for all enames block
 
How i can  select block to insert according to effective name?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: DCL Radio Button Label Length

Jun 28, 2013

I am trying to revise an old dialog box so that I can add some new options but I'm finding it difficult to shorten the label for a radio button enough to get the box width to look reasonable. I read somewhere that Windows fonts cause the label lengths to hold extra space for each character. The webpage that I found this on said the solution was to make a new line for the label, which sounded great to me, but they did not tell how to do it. After much searching, I figured out how to add an additional line to the label, but my program now refuses to function correctly. I set the middle button before initiating the dialog in my lisp, but when I select a different option, the original button remains selected along with the user's choice. The program actually works, using the last button selected, but I really want the button to respect the pick by the user and deselect the default button.

This worked perfectly when I had only two selections, and it still worked perfectly when I added the third option, but it just doesn't like it when I try to add a new line for the long description in the middle of a radio column.

I'm barely functional with dialog boxes..

DCL in question:
:boxed_radio_column { label = "Location"; width = 20; height = 2; fixed_width = true; fixed_height = true; alignment = top; :radio_button{key = "sl-AD"; label = "Spring Lake Applications";} :text_part{label = " and Distributor Services";} :radio_button{key = "sl-BP"; label = "Spring Lake BP Systems";} :radio_button{key = "gr"; label = "Grand Rapids";} }
 
lisp has the following in this order:

load dialog - I have a loading function that works fine
(set_tile"sl-BP""1")
(action_tile"sl-AD"           "(TGW-Setup_01 $key)")
(action_tile"sl-BP"           "(TGW-Setup_01 $key)")
[Code] .....

Of course, these are just the pertinent sections of a much larger setup dialog, but I didn't think I needed to post all the functions that this program is doing, since you'd have a difficult time running this without my templates, printers and a number of support files.

Like I said, it seems to be choking on my adding :text_part {  Label = "      and Distributor Services";} instead of making this a single line of the label for the button above it.

Why does this cause the default radio button to stop releasing?

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Label Difference Routine Adjustments

Aug 18, 2011

I found the following lisp routine on the forums and would like to know how to make a couple changes.

1. Have two line of text with the N or S on top of the E or W.

2. Include the foot symbol after the distance

3. Have the N,S,E,W placed before the distance, ex S 0.00'

4. Eliminate the negative sign

5. Use my current text height instead of dimtxt height

(Currently using Autodesk Land Desktop 2009 and want the text to come in based on the current text style since we use several different scales and text depending on project)This is a great routine that is going to make life much easier for us.

(defun C:LBD (/ P1 P2 TX);label difference
 (while
 (setq p1 (getpoint "
Specify first point or press Enter to Exit: "))
 (setq p2 (getpoint p1 "
Specify second point: ")
 ydiff (- (cadr p2)(cadr p1))
 xdiff (- (car p2)(car p1)))
[code]....

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Label Contour (2D Plines) From Elevation

Nov 21, 2013

Of course with ACAD MAP (FDO Labels for example) or better with ACAD CIVIL : no problem !

But often I have to use a Standard AutoCAD ...

A lots of people have already asked for this routine :

But I search in this forums and some others and unfortunately I can't find any correct routine Full operational on ACAD 201X 32/64 bits

I have many 2D Plines with an Elevation : some Normal , some have been splined --> 1st problem

I would like to label them with :

- either a Block with ONE attribut : the elevation

- either a MText with a blank Mask behind

As you wish ...

Question : Size/Height of the Block or MText ?

Some 2D Plines are very long (2nd problem) so I would like a question like :

Label each Pline every xxxx Units ?

So on a Pline Contour of 2000 meters, I could have the elevation (Block or MText) every 50 meters ...

Of course I would like that the Block or Mtext will have to follow (rotation) the Pline (splined or not) where the label is inserted !

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: 3D Point From X And Y?

Oct 9, 2013

I'm trying to find acceptable point values to feed to the vlax-3d-point function for a vla-addmtext function. With vanilla lisp I just provide the point as x y = "7/32" "2-3/8". So I assumed that I could drop a 0 in for the z like: (VLAX-3D-POINT "7/32" "2-3/8" 0).

Then I thought I was going to be tricksy and try (vlax-3D-point (getpoint)) believing that I could pick the point and get what I need to feed the function, but yet again, no deal. The command line gave me: 

node
of #<variant 8197 ...>

Nothing I can use in my code. So how do I find the point in a format that vlax-3d-point will like?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Put Point At Each End Of Arc?

Dec 19, 2011

What is the magic word for put a point at each end of an arc, the lisp I have only put a point at center of the arc.
 
(defun cAA ( / i j ss e1 e2 p1 p2 p3 points )
(if (setq i -1 ss (ssget '((0 . "ARC"))))
(progn

[Code].....

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Selecting Layer By Using Only Portion Of Its Full Name / Label

Jun 12, 2013

Ultimately I want to delete a bunch of Layers by selecting them using a portion of their name. Is there anything in cad that allows you to specifically select layers using only a portion of the layer name?

Based on AutoCAD Layer Standards: Users label layers with a code; for example: A-ANNO-TEXT

A - Stands for the Architectural Category the layer falls into

ANNO - Stands for Annotation

TEXT - Type of Annotation

I want to use the Layer Delete (-LAYDEL) command to delete all layers that begin with A-ANNO. In the Layer Manager (-LAYER) I am able to select specific layers using a " * " placed before and/or after " A-ANNO " to include all layers with that in its name.

When I write a script however (-LAYDEL); cad will ask me for the layer name, but will not allow me to use the *A-ANNO* to include all layers with that name: A-ANNO-TEXT, A-ANNO-GLAZ, A-ANNO-WALL, etc...

Is there anything in cad that allows you to specifically select layers using only a portion of the layer name??? I have to "taylor" drawings that I receive from companies who's layers may vary.

My script is in basic (NON LISP) language:

-LAYDEL
N
A-GENM
N
A-DOOR
N
A-DOOR-FRAM
N
A-DOOR-GLAZ
N
Y

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Setup Height Label For Sections And Elevations

Sep 16, 2013

I'm trying to set up a height label for sections and elevations. I then want to update it with a shortcut.

I already tried it with a field that shows me the y coordinates, but it won't show me the "+-"0.00 sign,when I put it to zero level. It only writes "0.00".

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Delete Text Style Not In Use?

Nov 29, 2012

I cannot purge a textstyle out of my drawing. When I run purge nothing is available.

However if I select the style from the style dialog I am able to select delete and delete the style.

When I use the method on the style (vlax-invoke-method style 'Delete). AutoCAD states:

Automation Error. Object is referenced by other object(s)

The style is defenatly not in use but may have been used in the past.

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Set Dimension Style To Annotative Off?

Nov 8, 2013

I am trying to create a lisp routine, that will check the dimension style "standard" to see if its annotative.  If it is, I need it to turn annotative to off.  

ITO - Application Management
Factory Design Suite Ultimate 2012
AutoCAD 2012 | Inventor Professional 2012 | Vault Professional 2012

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Restore Previous Text Style

Jun 5, 2012

I wrote (setq oldtext (getvar "textstyle")) to save the current text style,

(setvar "textstyle" (getvar "dimtxsty")) to change the text style to the current dimension text style (which appens to be romans) and later (setvar "textstyle" oldtext) to restore the text style to its original setting but it won't work.

This is the same format used to save and restore osnap in many lisp routines.

When I check the program in the visual lisp editor, oldtext returns "standard" (the original text style - so that part works) but "textstyle" returns nil.  I even tried (setvar "textstyle" "standard") to no avail.  "Textstyle" remains romans.

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: No Param On Closest Point?

Jan 4, 2012

Find attached 2 files , a DWG and a LISP

The dwg show a LWpoly, and 3d-poly.

I try to get the param at the closest point, from each vertex at the LW, at the 3d-poly

But as you will see, for some closests point at the 3d-poly there, is no Param

Check at

par+pt@3dpline-list

Here is a short sample

(0.0 598154.0 6.10764e+006 550.0)
(nil 596287.0 6.10656e+006 674.264)
(nil 594548.0 6.10568e+006 624.456)
(nil 594323.0 6.10534e+006 643.747)
(nil 595273.0 6.10224e+006 633.231)
(74.136 595246.0 6.1014e+006 590.0)

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Inserting Block On A Point Of Arc?

May 19, 2012

know a lisp routine that would insert a block @ a specific point on an arc? For instance if I have an arc that has a radius of 20'-0" & I want to insert a block at a set distance from the end of the arc.i could probably use the divide or measure command but I was hoping I could do it with lisp. I would also like to be able to move the object along the path of the arc at a specific distance.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Extract Point Data

Sep 18, 2000

I would like a lisp routine that can extract and export the x, y, z coordinates of all the points in a drawing into a text file so I can use the same in excel.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Accessing Point Clouds?

Apr 19, 2012

I have a small app to create, related to point clouds.

I know VisualLISP pretty well, definitely well enough to accomplish the task.but...I can't figure out how to retrieve information on the point cloud's clipbox using lisp.

I know a little VB.NET; I took a one-semester class at the JC, two years ago. It's going to take time for me to get ramped up enough with VB to do this job, so I don't really want you to tell me the only way to get to the clipbox is through vb.

way to retrieve and modify a point cloud's clipbox with VisualLISP?

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Polygon From Distance Between Point

Sep 18, 2013

I need a lisp that creates a polygon of N points, so to enter a only the distance between these points, after choosing N points in the drawing for approximately creating polygons.

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Insert Point At Every Block?

Apr 19, 2013

I need a routine that inserts a point at the insert point or block named "Insert_Point" at every block in the file. The routine could use the current layer, which would be set prior to starting the routine. If it could request the user for the PDMode value and PDSize that would be great too. This will assist me in creating block libraries.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Get Last Point Picked On Circle?

Sep 2, 2013

how can you get the last point you picked on a Circle because I was going to run the TTR and use the tanget command and have it exit and I need to get the point I pick on the circle 

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Losing Text Style When Use Entmod On An Attribute

Feb 25, 2013

I have a lisp function that is updating attribute values on a newly inserted block. The lisp function uses entget to read the attribute. Then it plugs a new value into the assoc 1 using subst, then uses entmod to update the attribute's value. It all works fine except that the attribute loses its style, i.e. assoc 7, somehow. If I do an entget on the attribute right after the entmod the assoc 7 is nil. The symptom on the drawing is that the attribute value is not visible until I close and open the drawing.

This only happens on a newly inserted block on existing drawings. If I close the drawing and reopen it then the lisp function works fine. Or If I insert the same block on a new drawing it all works fine. what would cause the assoc 7 to go missing after an entmod to change the attribute value?

View 9 Replies View Related







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