AutoCAD Visual LISP / AutoLISP :: Constructing Infinite Lines By Selecting Objects?

Aug 12, 2013

Is there way that by selecting objects (Lines,Pl) it construct infinite lines ?

View 3 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Selecting Multiple Objects

Nov 2, 2011

How to modify this routine so that I can select multiple objects as opposed to one at a time?

(Defun c:cd ()
(setq newdim (entsel "
Select Dimension to clear:"))
(setq newdimvalue " ")
(command "dimedit" "n" newdimvalue newdim "")
(princ)
)

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: SSGET For Selecting Multiple Objects

Nov 27, 2012

I have this code that I wrote years ago that I want to update to select two types of civil3d objects and show them selected with grips on the screen. This function works fine

(defun CELFEATURE ()
(ssget "_X" '((0 . "AECC_FEATURE_LINE")))
(setq sset (ssget "P"))
(if sset
(progn
(sssetfirst sset sset)
;(command "_.PROPERTIES")
)
)
)
(defun cF () (CELFEATURE))

but if I add the extra object like this which I assume is the wrong syntax i only get the second type of objects. Need correct syntax I should be using for selecting more than one object in an ssget statement.

(defun CELFEATURE ()
(ssget "_X" '((0 . "AECC_FEATURE_LINE","AECC_AUTO_CORRIDOR_FEATURE_LINE")))
(setq sset (ssget "P"))
(if sset
(progn
(sssetfirst sset sset)
;(command "_.PROPERTIES")
)
)
)

(defun cF () (CELFEATURE))

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Selecting Multiple Objects To Export Their Coordinates And ID

May 24, 2013

I am just starting learning lisp, And I am looking for a fast way to select multiple objects (usually circle) and export their coordinates and ID into a excel sheet through lisp programming.

As you might see in the attached drawing, the red circles are objects wanted. I have been trying to export their coordinates as well as their IDs in grids, e.g D28, Easting:  Northing:  . I still haven't found a good way to export ID for each circle.

As my code doesn't work, I wonder what's the most effective way to detect errors in lisp

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Selecting All On Layer 5

Mar 26, 2013

What a lisp routine would look like for selecting all items on layer 5. 

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Selecting Only Vertical Dimensions

Oct 25, 2012

The title says it all, Im trying to find a way to select just the vertical dimensions. Quick select doesn't work because there's no difference between a vertical and a horizontal dimension, so i was wondering if there was a LISP or something else i could do to accomplish this.

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Set Cannoscale By Selecting Dims

Feb 9, 2012

I am still green at lisp creation.  I would like to create a lisp to change my cannoscale to match that of an existing dimension in model space.  we use tabs and therefore have many different scales for the vports in our drawings.  i want to be able to type my command, have acad ask for a annotative dimension to match, i click it, then the lisp resets my cannoscale to match.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Selecting Text Strings Of The Same Value

Apr 22, 2013

A code that scans all through the drawing and selects the texts of the same value regardless of the layer, color, style, ...etc..

Just selecting duplicates for highlighting nothing more.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Selecting File Location In Routine

Oct 19, 2011

I wrote this small program to automate plotting a drawing to pdf. Everything work fine except I cannot figure out how to allow it to let me pick where I want the file created and what I want to call it. In this routine, the "" at the 3rd from the end place will just automatically name the file and put it in the parent folder. If I replace the "" with pause, it lets me change the name, but will not let me choose the location.

What I'm looking for is for a dialogue box to pop up (explorer style) that will let me choose a location and name the file. This is what happens if you do it "long hand" inside ACAD, how to do it in the code.

(defun C:clpdf ()
(setvar "cmdecho" 0)
(setvar "osmode" 0)

[Code]....

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Selecting All Dynamic Blocks With A Pick

Jul 30, 2013

I used to have a lisp routine that would allow me to pick one dynamic block and it would select all instances including the blocks that have become anonymous. 

View 5 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 :: Intersect Between Two Lines Using Start And End Values Of Two Lines

Oct 11, 2013

With all of you fine teachers, I have the know-how to get the start and end values of a line.

Do you think there is a way to get a point returned that represents the true intersection of the two lines, without having to involke a user defined "getpoint" function using "intersect" osnap?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Construct Lines Between Lines Ending Points Multi Selection?

Aug 3, 2013

I want to construct lines between every two line ending point by multi selectio window instead of drawing it manually between lines ending point ?

View 3 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 :: Getting Objects Layer?

Feb 7, 2010

How can I get the layer that an entity is on. I have tried numerous method but they don't seen to be retrieving the layer information.

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Line Between Two Lines?

Feb 15, 2013

I am trying to draw a line between two lines and I put together the following. It works great if the start/end points are perpendicular to each other. How do I solve if line one start point is in a positive direction and line two is in a negative direction? 

(defun c:test ()
 (setq L1 (car (entsel "
Select the first line: "))
L2 (car (entsel "
Select the second line: "))
 )

[code]....

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Available For Angle Between Two Lines?

Nov 28, 2011

i know DIMANGULAR command will let me draw a dimension to display the angle between two lines, but is there a way for my commandbar to show me what the angle is rather than draw a dimension?

I often want to simply know the angle but not display it in the drawing, and it'd be good if there was a command/lisp which showed me in the command line area, or perhaps a pop up window, similar to what the TLEN lisp does here: URL....

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Get Min Max Coordinates Of A Set Of Lines

Dec 5, 2013

I want to get the minimum and maximum x, y coordinate values of selected lines. In other words, i want to find the top, bottom, left and right edges of a set of lines.

Is it possible to achieve this with a lisp code?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Delete All OLE Objects From Drawing

Nov 26, 2012

how to delete all OLE objects from drawing by most efficient way.

There are abt 150 drawings, each has from 2 to 20 or so OLE objects which need to be deleted. OLE objects are on many paper spaces.

I tried to use qselect but it selects only what is in current space.

Would need some lisp or some other methode than all can be deleted (excluding those which resides in blocks).

Tried also yto use ssx and then erase but still it deletes only what is on current space.

Just as additional info, those OLE are all pictures, not xls files for example.

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Reactors And Objects With Fields

Mar 7, 2012

I am trying to add a reactor, where if the object i move or copy is s a block of a certain name, then i would like to run update field on the last object (being copied) or the object being moved.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Add Multiple Hyperlinks On Objects

Jan 11, 2013

The below adds a hyperlink to the selected object.How might it have to change to add multiple hyperlinks?

(entmod
 (append (entget (car (entsel)))
     (list
      (list -3
         (cons "PE_URL"
            (list
             (cons 1000 "..\..\90 Submittals\90-3 O&Ms\fig83-clevishanger.pdf") ; Relative Path to a pdf file.
             (cons 1002 "{")

[code]...

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Take Two Objects And Swap Their Positions?

Sep 19, 2011

I have been searching for some information on how to pass objects into a function so I can mess with their properties. Somehow I haven't been very successful. Anyway...What I want to do is take two items (light fixtures) and swap their positions on the drawing. It seems like it must be really simple, but I'm just not finding the key puzzle pieces to do it. It seems like if I could figure out how to pull two objects into the function (whether by selecting them and running the function or by selecting them after I run the function) I could very easily save the coordinates of one to variables and then just swap them.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Exporting List Of Objects

Jan 6, 2012

How to export to a txt file a list containg all the objects on the current layer and their properties?

To be precise, I would like to export the following items from a selection of plines:

- ObjectID;
- Start Point;
- End Point;
- Vertex Points;
- Width.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Select Objects With Given Xdata?

Jan 2, 2012

with a function like this I added some xdata, some MULTILEADER

(defun c:add_xdata () (princ "Select: ") (setq ogg (car (entsel))) (addXdata ogg "TEST" "CODICE" "1256") (addXdata ogg "TEST" "MATERIALE" "LEGNO") (addXdata ogg "TEST" "TIPO" "A"))
 
Now with the following function can only select leaders who have linked the xdata application TEST

(setq selez_all (ssget "X" '((0 . "MULTILEADER")(-3 ("TEST")))))
 
I can not, however, find a way to select all MULTILEADER who have a particular value of XData.

For example I would select all MULTILEADER with MATERIALE = "LEGNO" and TIPO = "A".

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Area Of Multiple Objects

Nov 3, 2008

I have a lisp I use to calculate the area of an object. The section below is the area part of it:

(setq ojt (entsel "Select object to get area of... "))

(command "area" "o" ojt)

(setq oarea (getvar "area"))

I want to modify it to add the areas of multiple objects. Unfortunately it is not as simple as;

(setq ojt (ssget "Select object to get area of... "))
(command "area" "a" "o" ojt)
(setq oarea (getvar "area"))

So how would I go about doing it?

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Possible Select All ANNOTATIVE Objects In A DWG

Jun 20, 2012

is it possible select all ANNOTATIVE objects in a DWG and  to set a Viewport/ANNO scale for all  via lisp

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Draw All Objects At Same Time?

Sep 24, 2012

I have made a lisp routine to draw lines on polyline. And here are a lot of lines on it. So using comand

"(command "line" pt1 pt2 " ")"

takes a lot of time. Is here a way to creat lines in memory or similar and only then draw them all on screen?

I have search but coudin't find any info. I do not know how to formulate a query.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Moving Objects In The X / Y Plane Only

Jul 29, 2013

I want to move a large 3D steel file on top of a 2D architectural background. The ISSUE is that when i move it (in plan view "aka top view") the X,Y coordinates change AND the Z coordinate changes... But, I want the Z coordinate to stay the same . I wrote a LISP file that doesnt seem to work (SEE BELOW):
 
(defun C:MoveXY (/ PT1 PTB PT2)(setvar "CMDECHO" 0)(setq PT1 (getpoint "
Specify Base Point or [Displacement] Displacement: ")PTB (getpoint "
Specify second point or <use first point as displacement>: ")PT2 (list (car PTB)(cadr PTB)(cddr PT1)))(command "_.MOVE" (SSGET) "" PT1 PT2))

It seems my issue comes when i get to the command line (ssget) seems to mess it all up . How to use the ".Move" command with the (ssget) function?

View 7 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 :: Multiple Mirroring Lines

Aug 27, 2013

Project involves repeatedly mirroring a line by selecting mutiple lines to do the mirroring. Probably sounds confusing.

The progress so far can be found here: [URL] ........

View 1 Replies View Related







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