AutoCAD Visual LISP / AutoLISP :: Auto Offset For Selected Items

Jan 25, 2013

I wish to have a lisp than enable to do automatic offset base on some selection of lines ,circles or polylines object as shown in attachment.

View 9 Replies


ADVERTISEMENT

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 :: Delete Offset Line

Sep 6, 2013

There are many lisp that draw offset line but what about opposite way , I have wall of double line i need to delete one of them let's say inside wall line .

why i need to do this usually when i tracing in external program like autocad architecture or Revit or archicad  i just need outline of exterior and interior walls !.

is there way that can delete the offset line  ?(or within range predefined in lisp to prevent interfering of lines deletion).

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Place A Line Behind Other Items

Nov 13, 2012

I have a lisp file that reads in a point list from a text file and creates a number with a circle around it for every point, then a line from one circle to the next in line with the center point of each circle. Is there a simple way of making the lines "go behind the circles". The portion of code that creates the circles, lines and text is as follows and a cutout screen dump of what it looks like is below.

(setq amount 0)
(foreach item lines
;;;                                                              ;;
;;;  Create the text                                             ;;
;;;                                                              ;;
 (setq x (+ (atof (nth 2 item)) (car pt_origin)))
 (setq y (+ (atof (nth 3 item)) (cadr pt_origin)))

[Code]....

IV 2010

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Find Offset Origin Of Layout

May 8, 2013

I want to know the correct way to find the offset origin of a layout in an AutoCAD drawing.  Let say I have a drawing that has many items on it.  And I create a layout showing just the items in the lower right corner of the drawing.  I want to know the offset origin of this layout relative to the Model space.

I came across some LISP commands that are supposed to do just that:
 
(vl-load-com)(setq activelayout (vlax-get (vla-Get-ActiveDocument (vlax-Get-Acad-Object)) 'ActiveLayout ))(setq activeplotorig (vlax-get activelayout 'PlotOrigin)) 

Unfortunately, the commands don't seem to work because it always returns (0.0 0.0).  That cannot be right.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Create A Line With Text Offset

May 6, 2013

I am a beginner at LISP and this is a bit out of my league... and I'm trying to create a lisp where I can draw a polyline between 2 points that also places text with the actual distance offset above the line.

I did find this post and I'm not quite catching on.. [URL] ......

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Calculate Points Offset To Pline

Sep 27, 2013

what I am attempting -

Pick a line

Pick a starting point on the line

Pick a ending point on the line

Pick side to offset

create list of offset points

Create a new line with a offset

I think I could do this using brute force, but would prefer a mathematical solution.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Selecting Object And Passing To VLA Offset

Feb 29, 2012

I'm trying to complete the code to select a p-line on layer G-POLY-GSF w/o asking for input. this (setq ent (ssget "X" (list (cons 8 "G-POLY-GSF"))) dosen't seem to work. What I'm I missing here?

(defun cf8 (/ ent dist obj)
(vl-load-com)
(setq ent (car (entsel "
Select line to offset: "))
;(setq ent (ssget "X" (list (cons 8 "G-POLY-GSF")))

[Code]....

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Polyline Offset Trim And Erase?

Oct 8, 2013

I've been looking for a lisp program.  I've tried to mix-and-match code to come up with a working lisp but nothing is working. I am using a polyline rectangle to start with, offsetting it out 0.75 outward, and triming everything outside of the offset and erasing the offset. 

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Union Items After An Array Polar

Mar 12, 2012

I would like to do an array polar for 4 items and union with the command "union" all of them automatically.. how can i do that in a lisp ?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Select / Highlight All Items In List Box?

May 6, 2012

How can i select/highlight all items in a Multi_select list_box? 

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Up-to-date Offset Command - Line Prompts

Jun 7, 2012

I posted a version of the Offset command that lets you Undo individual Offsets and change the offset distance/Through option, without getting out of the command, at Cadalyst CAD Tips: URL....

It's an upgraded version of an earlier concept by Gopal Ramesh.  It's been downloaded almost three times every day since it went up, so I guess people expect it will be useful.

But the website's description includes: "this routine does not provide access to the Layer or Erase options of the built-in Offset command."  The reason for that is that I'm working back in 2004, so those options are not present for me to emulate.  [The Undo option in the routine is one that was added in some later version, but is a very useful enhancement for people using older versions, like me.]

I do also have an Offset-to-any-Layer [not just the source's or the current Layer] routine posted there: URL....

And I have a simple little routine to Offset something and Erase the source object.  So I think I have all the "pieces" to include those options that newer versions have, but that I don't.  I would like to combine the functionalities into the Offset-with-running-options routine.  That way, if people want to use it to redefine the Offset command as I have done, in order to get the while-running distance change option, those working in newer versions won't be losing the Erase and Layer options in the process, and those in older versions will be gaining yet more options.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Bounding Boxes Around Items With Extrusion Vector

Apr 1, 2013

I have 3d items exported from sketchup, that have extrusion vectors to them.the VLA-GETBOUNDINGBOX lisp function seems to return values from the block's coordinate system.

I need values as if there was no extrusion vector, in WCS.I am not clear on how to do this, as it seems like I want a fundamentally different box.Is there a way to recalc the box orthogonal to world coord system for each insert of the block? URL....

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Attribute For Only Items Visible On Screen

Mar 30, 2012

im trying to change an attribute for only items visible on screen why dose the follow in then work and the one there after not?

(command "_attedit" "N" "N" "A4LANDSCAPE" "MYDWGSTATUS" "*" "" (cadr (fnsplitl (getvar "dwgname"))))
(command "_attedit" "N" "Y" "A4LANDSCAPE" "MYDWGSTATUS" "*" "" (cadr (fnsplitl (getvar "dwgname"))))

View 4 Replies View Related

AutoCAD Civil 3D :: Offset Lisp Routine To Offset Selected Line?

Jun 7, 2013

I need an offset lisp routine to offset a selected line a set distance on each side of the selected line and change the layer of the offset lines to the current layer, and then keep prompting me to select the next line for offsetting until I'm finished.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Macro - Auto Numbering

Aug 6, 2012

I urgently need a program that can auto number panels for a large drawing I have. I have a lisp program for auto numbering but we need each insertion of text to start with a P i.e. P1, P2, P3 etc etc.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Set Auto Constrain Setting?

Jul 12, 2013

Is there a way to set the Auto Constrain setting using lisp. I would like to be able to run a quick constrain all and then delete all constrains to fix gaps in geometry. However I only want to use the coincident, Vertical and horizontal.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Selected Text(s) To CSV Files

Nov 14, 2012

I need a LISP program that prompts: "select text(s)" then I select for example 100 text in open drawing file.

after that this program creat a file (LIST.CSV) and write each selected text in line by line of this file:

result text file (LIST.CSV ) should be:

Text1

Text2

Text3

...

...

Text99

Text100

 ofcourse Text1 is the content of a text object.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: New Layer For Selected Objects

Jan 1, 2014

I need a LISP that create a new layer and ask me for the name and the other properties (color,lw,lt..).

ask me if I want move the selected object for the new layer (yes is the default value)

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Detect If There Are Objects Selected

Oct 18, 2012

Any way to detect of there are objects currently selected using Autolisp, visual lisp or even VBA. I would like to be able to do something using that as a conditional, so that (assuming the hypothetical variable isSelected is an on/off indicator of whether or not something is selected) I can code something like this:

(if (isSelected) (...))

View 4 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 :: Don't Auto Open Or Close Dialogs

May 30, 2013

Is there a way Autocad could just do what I asked for, and nothing more?A few examples

- After publishing, the publish dialog auto closes.  I don't wat that.  After publishing dwf I also want pdf.(I know you can save the list, that's not the point.  If you didn't close the dialog I wouldn't need it)

- When selecting a hatch, the ribbon automatically jumps to Hatch Editor.  I don't want that.  Maybe I just want to change the layer.  I can find the Hatch editor my self..Dito for XREFS

- I do not want any dialog giving me warnings, about anything.  

If an XREF doesn't get attached, I can see that.  I don't need a dialog telling me.If a shape file is missing, I can see that..A triangle sign above the command line is totaly adequate.Don't auto open or close dialogs, for what ever reason.

So ... don't auto do anything I can perfectly do manualy.  No doubt there are a few more examples I can't think of right now.The nice thing would be to get a variable that gives me that "no auto" mode.  

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Auto Dimension Closed Polyline

Mar 8, 2013

Is there a command or a lisp that will automatically dimension each side of a closed polyline at once? See attachment for image. 

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Prompt Text / Mtext Not Selected

Nov 13, 2012

I’m trying to put together a loop for if nil or something other than text or mtext is accidentally selected than prompt text was not selected. This is what I have so far.

text or mtext is not selected than prompt

(defun C:ww ()
(while
(not
(and
(setq esel (entsel "
[Code]......

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Move Selected Objects By Value Of Their X Or Y Properties

Nov 23, 2012

I need a program to move some selected text to a line something like as extend command but for text objects!

suppose that there is a horizental line (y=constant) or vertical line (x=constant) and some selected text(or other objects), I want a lisp program that move these selected text (or objects) by their "insertion point" to this line.

in other word, if the selected base line is horizental (y=constant) then property of "Y" of all selected text should change to line's "Y"; and if selected base line is vertical (x=constant) then value of "X" of all selected text should match to line's "X" value.

for example, for base vertical line (x=constant) and 3 selected text(or can be any object) result is:

text1.          |                        text1.|

  text2.        |         ===>       text2.|

    text3.      |                        text3.|

|  .text1                                 |.text1

|    .text2                ===>       |.text2

|      .text3                             |.text3

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Show Difference In Selected Text?

Jan 17, 2013

I have a little routine to add two selected numerical texts together and show the result at a selected position. I am using the entsel method to select them. I would like a way to highlight the selected text temporarily. Is this possible. The routine is as follows.

(defun c:T+ ( / Txt1 Txt2 Txt3 Pkt )
 ;Adds second selected number to first
 (setvar "dimzin" 3)
 (setq curlay (getvar "clayer"))
 (setq curcol (getvar "cecolor"))
 (setq curlin (getvar "celtype"))
 (setq ds (getvar "dimscale"))

[code]....

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Add Attribute To Selected Blocks (XY Coordinates)

Nov 30, 2012

i have found the following lisp in a previous thread: (shows XY coordinates of the selected blocks)

(defun C:MyFunc (/ ss Index Ename Lst)
(while (or (not ss) (= 0 (sslength ss))) (setq ss (ssget '((0 .
"INSERT")))))
(if ss

[Code]....

I want this information to be added to the blocks as hidden attributes so that i can extract them by attout. The work to be done is : attout to excel, autofill an attribute (numbering) then attin.

but my problem is that i cant think of a way to number those blocks IN ORDER (ie top to bottom or left to right) unless by sorting them in excel first by their x or y coordinates

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Adding A Text To Selected Texts?

Jan 24, 2013

I need a LISP program to add a text given by user to all selected text.

in other words:

1- user selects some texts.

2- user give a text to program.

3- Program added this text to all selected text.

selected text: text1, text2, text3,text4,....,textn

given text by user: _xyz

Result:

text1_xyz, text2_xyz, text3_xyz,text4_xyz,....,textn_xyz

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change All Selected Hatches To Solid?

Apr 1, 2012

I need to convert a lot of different hatches to solid hatches.

I haven´t found a way to do it in Autocad 2012.

script that cycles to all selected hatches and change the properties to solid?

View 4 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 :: How To Move The Selected Object Using ObjectDBX

Aug 7, 2013

Using Nentsel function, I can get info on a object that is nested with an Xref. Is there a way to move the selected object using ObjectDBX?

View 9 Replies View Related







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