AutoCAD Visual LISP / AutoLISP :: Use Existing Arc As Fillet Rad

Mar 21, 2007

I have this routine for using a selected arcs rad value as a new fillet rad. If you like, a "match fillet" routine:

;Fillet Copy
;Copies the Radius of an Existing Fillet or Arc;
(defun C:filletcopy ()
(setvar "cmdecho" 0)
(setq c1 (entsel "
Select Fillet to Copy:"))
(setq c1 (entget (car c1)))
(setq rad (cdr(assoc 40 c1)))
(setvar "filletrad" rad)
(princ "
Select Lines:")
(command ".fillet" pause pause)
)

I use the routine loads but could modify so it would pick up the value of a filleted polyline? As it stands it can only select an individual arc. I would like the routine to be able to pick individual arcs and/or filleted polylines, without exploding first, if possible....

View 9 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Polyline Width And Fillet

Feb 5, 2013

I've been searching on and off all morning for a lisp routine, without any luck. I'm trying to draw a pline with a pre determined width (5") and be able to draw unlimited line segments then automatically fillet with a pre determined radius (5").

I wrote this generic macro: ^C^CPLINEWID;5;PL;\\;FILLET;R;5;F;P;LAST;  to save SOME time but I want unlimited line segments. Can this be modified or would a lisp be the better route to go?

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Fillet Pline Vertex

Aug 8, 2012

I have this code to make fillet to a polyline, but the command does not allow specify fillet radius. How I can change the routine?
 
(defun C:filletv ( / ent ) (setvar "FILLETRAD" 2.500) (if (setq ent (entsel "
Select element near vertex: ")) (command "_fillet" "_P" ent) ) (princ) )

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Make Fillet With Window Selection?

Jul 11, 2012

It's possible make a fillet with window selection?

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Turn A Line Into Polyline And Do Zero Fillet

Jan 18, 2013

I have a lips that creates a zero radius fillet.

(defun c:FZ  () (setvar "FILLETRAD" 0)(command "_.fillet" "multiple"))

This works great.I would like to expand this by turning the line into a polyline..

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Redefine Existing Block

Jan 29, 2012

I am using the following function to create a block:

(defun crea-blocco (ip blockname gruppoogg / blkobj sArray c r vla-objects doc) (setq c -1) (repeat (sslength gruppoogg) (setq r (cons (ssname gruppoogg (setq c (1+ c))) r)) ) (setq r (reverse r)) (setq vla-objects (mapcar 'vlax-ename->vla-object r)) (setq doc (vla-get-activedocument (vlax-get-acad-object))) (setq blkobj (vla-add (vla-get-blocks doc) (vlax-3d-point ip) blockname)) (setq sArray (vlax-safearray-fill (vlax-make-safearray vlax-vbObject (cons 0 (1- (length vla-objects)))) vla-objects)) (vla-copyobjects doc sArray blkobj) blkobj)
 
But if I start this function two times with the same block name, I get a block with the selected objects added to the existing block.

How can I redefine an existing block with vlisp?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Override Existing Commands

Mar 19, 2012

Any way to override existing AutoCAD commands.

Lets try this.  When a user types "line" at the command prompt, or hits the "line" button on the toolbar, or chooses "line" from the draw pulldown menu, is there any way I can re-write what line means and draw a circle?  (Extreme example)

There are just some commands that I'd like to have a variable set in the background, depending on what the command is.  So I'm thinking if I could re-write the "line" command, instead of trying to convince everyone to use and remember a custom command, it would be much more efficient.  There are lisp files already loaded in their start-up suite.  Not sure if that works.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Modify Existing Selection Set?

Sep 5, 2012

I need the same funcionality as in code below, but without using "command".

The main idea is alowed user to modify Existing Selection Set.

 (defun gt:ss->lst (a:ss / i lst ) ;_ / (setq i 0) (if a:ss (progn (repeat (sslength a:ss) (setq lst (cons (ssname a:ss i) lst) i (1+ i) ) ;_ setq ) ;_ repeat (reverse lst) ) ;_ progn ) ;_ if) ;_ defun gt:ss->lst(defun gt:ss_modify (a:en-lst / ) ;_ / ;;create Selection set (setq ss2 (ssadd)) (foreach f:en a:en-lst (ssadd f:en ss2) ) ;_ foreach ;;Run command and fill with initial content (command "_select" ss2) ;;Alow the user to modify the contents (while (/= (getvar "cmdnames") "") (command pause) ) ;_ while ;;get back the list of enames from modified selection set (setq ss3 (ssget "_P")) (setq ss3-lst (gt:ss->lst ss3))) ;_ defun gt:ss_modify(defun tst:gt:ss_modify ( / ) ;_ / (gt:ss_modify (gt:ss->lst (ssget)))) ;_ defum tst:gt:ss_modify

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Search For Existing MLeader With Attribute Value

May 21, 2013

I'm working out a LISP for searching my entire drawing for a MLeader with a given value and then do something if it is found.

Currently, my code dies with 

; error: Automation Error. Description was not provided.

I do not know what is going wrong & I don't know what must be done next.
 
(DEFUN ML-SRCHSTR (TXT LBL / SS n_txt_LBL ENT P1 P2) ;|(ML-SRCHSTR TXT)|; (IF (SSGET "x" '((0 . "MULTILEADER"))) (PROGN (SETQ ss (VLA-GET-ACTIVESELECTIONSET (VLA-GET-ACTIVEDOCUMENT (VLAX-GET-ACAD-OBJECT)))) (VLAX-FORent ss(IF (VL-STRING-SEARCH txt (STRCASE (VLA-GET-TEXTSTRING ent))) (PROGN (VLA-CLEAR ss) (INITGET 1 "Yes No") (SETQ n_txt_LBL (STRCAT "
=>> " LBL " Label EXISTS! Add another " txt "? ") y_n (GETKWORD (strcat n_txt_LBL " [Yes/No]: ")) ) (IF(= y_n "Yes") (PROGN (ppa-L-

[Code]...

My MLeader has a _TagBox & it is the attribute of the _TagBox that I am trying to check/compare the "txt" value.

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Attach Leader To Existing Block

Oct 24, 2013

Is there a way to attached an already exisiting placed block to a leader. If so, is there a way to do it to all the existing blocks, that are of the same block definintion, at once?

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Get Serial Letters And Numbers From Existing Ones

Mar 2, 2013

Lisp file to get serial letters and numbers from existing ones,

I got a lisp file (attached) from experts in the form which does generate serial letters and numbers from existing ones.

The issue with this lisp file is that it doesn’t give the opportunity to choose the direction of numbering (top to bottom/bottom to top/left to right/right to left) as shown in the screenshot below

How this lisp can be developed to give the user the chance to choose the direction of numbering?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Modify The Existing Parametric Parameters?

May 2, 2013

Is there a way to modify the existing Parametric Parameters that are in the Parameters Manager using LISP?

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Start Command On Existing Selection Set?

Jan 29, 2012

I'd like to pass and existing set of selection to a command like laylck, which asks for selections after beginning the command. 

It must be possible to do this. Some CUI setup, lisp routine?

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Adding Variable To Existing File

Oct 4, 2012

I have attached 2 lisp files. datblkx5 makes a block of selection, inserts the block with a 5x distortion, explodes it, and corrects the text for width factor and text height. This one works fine.

I wanted to add the feature of scaling my selection with a user input value. This is the lisp datblkxxx. This one doesn't work. (that is it doesn't correct the text for width factor). I can't figure it out.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Mirror MTEXT Existing In Drawing

Aug 2, 2012

i have a situation that i need to mirror a lot of MTEXT exisiting in my drawing with following needs ( as attached CAD file) :

- MIRRTEXT = 1

- original text retain not deleted.

- mirrored texts become on another layer with another color.

- mirrored texts exactly become over the original text.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: CANNOSCALE Value Needs To Match Existing Named Scale

Jan 18, 2012

The crux of the matter is that the CANNOSCALE value needs to match an existing named scale.  This lisp is part of a bigger lisp and I need to pass a variable into it.  Here's what I have:

(setvar "CANNOSCALE" (strcat "1" = " (rtos variable 2 0) "'"))

But I get this error when I try to run it.

; error: bad argument type: numberp: nil

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Move Existing Objects To Snap Grid?

Dec 22, 2012

I have a slightly unusual query that I can't seem to find a solution for elsewhere. I have an existing OS plan that is 'off grid', and would like to adjust the vertices at the ends of all the existing lines and polylines so that they all sit on a grid point, ie round all vertices to the nearest whole number. Is there a quick command or script that does this?

View 2 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 :: Change All Objects On Layer 0 To Existing Layer PC Module

May 31, 2012

I'd like to have/write a lisp to change all objects on layer "0" to layer "PC - Module"

If possible also;

save the document close the document open next in directory run layer changer program again.

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Continuous Dimension Lisp That Alternate Its Position

Jul 12, 2012

Is there a lisp that will allow me to do a continuous dimension, but will alternate the dimension position from low, high, low and high?  If there is no lisp already created, how to create one? 

See Continuous dimension attachment for example.

I work at a glass and glazing company and this is how we dimension mullion width and DLO. See typical window dimensioning attachment for window elevation with dimensions.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Add String To Each Item In List Using Lisp

Nov 14, 2013

I have a list ("temp.dwg" "temp2.dwg") and would like to add the string "insert text here" into each item in the list resulting in ("insert text heretemp.dwg" "insert textheretemp2.dwg").  how would i go about doing that using LISP?

View 2 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 :: 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 Visual LISP / AutoLISP :: Visual Effect Settings?

Jun 20, 2013

Lisp that switches back on Selection Preview i.e. thickens and highlights lines when you hover over them?I don't know why, but they are always unticking the boxes.

View 4 Replies View Related

AutoCad :: Can't Fillet Between Existing Line And Arc - Non Coplaner

Dec 14, 2012

Autocad 2012 LT. I can't fillet between an existing line and arc. The line's start Z is 0 as well as middle and end are 0. The arc is the same....but still it says they are non coplaner and will not fillet.

In another area of the drawing, I draw an arc and a line and they will fillet just fine..... This is weird....

I have gone back in to the properties and even though the say that the Z is 0, I type "0" in again and then it will fillet.....

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Combinations In DCL?

Sep 7, 2012

Is it possible to execute a certain command based on multiple selections withinin a dcl?  for example:  two radio colums, one with selections A and B, and a second with selections 1 and 2.  is it possible to program commands based on user selections from each column?  ex: if A and 1- do a command.  A 2- do a different command, etc...

I tried :

 (action_tile "key1" "(setq A t")
 (action_tile "key2" "(setq B t")

 (action_tile "key3" "(setq 1 t)(done_dialog)")
 (action_tile "key4" "(setq 2 t)(done_dialog)")

(if
(and (a) (1)
)
(command ...

but was unsuccessful.  no matter which combination was selected, the command under all combinations would run.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Get Attribute Value

Jun 3, 2013

I am trying to find a lisp that would get an attribute value (tag name = NBR_5) . I'm trying to run a simple routine that would let the user place the value from the titleblock attribute as text on a drawing. I see a ton of articles regarding getting attributes but I am not well versed in programming.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Nil At The End Of Command

Jun 22, 2012

I have a routine that work fine, but I receive a nil at the end of command. How to fix that?

View 7 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 :: Get The Value Of Attribute

Dec 30, 2011

Is there a quick way of getting the value of an attribute?

I have an attributed block called "tp_attributes" and it has and attribute called "OrderNum".

I just want to be able to quickly grab that value.

View 3 Replies View Related







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