AutoCAD Visual LISP / AutoLISP :: Find Plotting Parameters With Vlax

Nov 18, 2013

the names of the function to establish the plotting parameters using the (vlax-get-property <name> <parameter> ) method.  For example the plotting device name is obtainable by (vlax-get-property <objectname> 'Configname).  

What "words"/parameters do I use to find the plot orientation and paper size?

View 9 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Extract Values X Y Z From Vlax-3D-point

Jan 3, 2012

how to extract value X Y Z of point p3 p4

(defun c:test ()
  (vl-load-com)
  (setq actdoc (vla-get-ActiveDocument (vlax-get-acad-object)))
  (setq objm (vla-get-ModelSpace actdoc))
  (setq obju (vla-get-Utility actdoc))
(setq oldhigh (getvar "Highlight") oldsnap (getvar "Osmode") oldblip (getvar "BlipMode") oldecho (getvar "Cmdecho") );setq
(setvar "Highlight" 0) (setvar "Osmode" 517) (setvar "Cmdecho" 0)  (setvar "Blipmode" 0)

[code]....

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Create AddLightWeightPolyline From Vlax-3D-point?

Jan 17, 2012

create addLightWeightPolyline with 4 points above:

;    pktaSpocznik01Lg pktaSpocznik01Ld pktaSpocznik01Pg pktaSpocznik01Pd
(defun dtr (x) (* pi (/ x 180.0)))  ;define degrees to radians function
(setq dokladnosc 3) (setq odScianaVerg 200)  (setq odScianaVerd 150)
(setq odHtextOr01 2.5) (setq odHtextOr02 3.5) (setq odHtextOr03 5)
(setq odWmPrzekroj01 500) (setq odWmPrzekroj02 700) (setq odWmPrzekroj03 1000)
(setq OdwrOverallScale 0.1) (setq odWmExLine01t 50)
(setq odSciana01gr 250)  (setq odSciana02gr 250)

[code]...

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Parameters Dynamic Blocks

Feb 20, 2012

I'm using the attached lisp to change the parameters of a dynamic block. In particular, I use the function chgdynprop

(defun c: test () (setq oggfreccia (car (entsel))) (chgdynprop (Vlax-ename-> vla-object oggfreccia) "Distanze1"300.0))

The lisp function works properly, because if I select the block from the bar I can see that property Distanze1 = 300.0

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Save Parameters To Defaults?

Apr 27, 2011

how do i save my parameters to defaults?

each time i create a sectioonplane i have to change hatch type , scale , and other things .

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 :: Plotting All Layout Tabs

Jul 22, 2004

Any lisp file that can plot all of the layout tabs? I am looking for one that will plot to a plt file and also pdf?

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Routine During Batch Plotting

Jun 17, 2013

I cannot get my lisp routine to run when I batch plot in AutoCAD 2014.  It's loaded into the startup suite and runs when I open the individual drawings but not during a batch plot.  How can I get this to run during a batch plot?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Batch Plotting Isn't Working

Jun 15, 2012

I recently upgraded to a new PC.

We get a lot of files from customers where there are multiple drawing borders all in model space.

Sometimes as many as 150-200 borders in one file that we need to print for the shop floor.

Years ago, I wrote a LISP routine that prompts for printer settings (Fit or To scale, etc.) and then prompts for

2 corners of each border and then writes a script file and launches it to batch plot each drawing.

My thinking was that I had to manually pick each drawing anyway, this LISP routine saved me from having to issue the plot command over and over.

Anyway, since my PC upgrade, the LISP routine fails.

There is a line of code that answers the plot prompt for output device name where I have the same printer as always.

When the script runs up to that line, AutoCAD tells me that printer is "not found".

So then it keeps reading the rest of the script lines which answer other plot prompts and repeatedly says "device not found".

If I manually print, I can choose the same print settings in the dialog box that the script file has and it can "find" that same device.

Why I can print manually but the LISP/script file gives me a "not found" error.

BTW, when I upgraded my PC, I also upgraded AutoCAD from 2012 to 2013..

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Dynamic Block - Accessing Action Parameters

Jun 3, 2013

I have a new project coming up where I need to write some simple programs to access the dynamic action parameters in some existing dynamic blocks.I have viewed what I could find on AU, but I still ave not found anything relating in-depth to dynamic blocks. 

Any good Tutorials, Articles, or White Papers, on  working with dynamic blocks with autolisp/ vlisp?  The main function is to access a parameter and change it by entering a numeric value, updating the block. say from a linear/polar stretch, or a linear/ polar move.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Batch Plotting Lots Of DSD Files

Apr 26, 2012

Is there any way for me to choose a bunch of .dsd files, and have those be batch plotted?At the moment I have to publish one .dsd file at a time, and each .dsd file can take about 10 minutes to go through all the layouts I have.

Does Autocad have that capability built in? Or is this a problem that can be solved with scripts?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Prevent From Open Adobe Reader While Plotting DWG To PDF?

Nov 20, 2013

I have one function which generate the PDF file using COM API.

That function works fine and generated the PDF successfully.

Only problem is after generating the PDF, Adobe Reader is opened to display that DWG file which I have plotted.

so is it possible to plotting to PDF file without opening Adobe Reader?

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Find Snap Errors

Jun 9, 2004

how to check snap errors in drawing in a specified layer against some other layer. means first layer should end with second layer otherwise place error.both layers have linear features.

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Find And Mark Blocks

Dec 24, 2013

My drawing constitutes of many blocks and other objects , and i need to find specific blocks (with same block name) in my drawing which i cannot find them one by one and i though that i can find them all with lisp routine ..

so , i wanna specify point out of my drawing area and lisp routine will draw to line from basepoint of those blocks to specify point when i select one reference block.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Find Overlapping Text?

May 24, 2007

What would be the ideal way to find out the overlapping text.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Find Cellname In Excel

Jun 25, 2012

I would like to get the cell with a specific name in Excel.

In Excel you can give a cell a custom name like "Project_Name".

How do I get the sheet and cell(row,column) of the cell with this custom name ?

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Find Object Associated To A Field

Nov 1, 2011

We use multi-leader objects in our drawings. When the multi-leader and its value are to be replicated throughout the drawing, we create mleaders with fields that show the contents of the first mleader. That way we can update only the value in the first mleader and all of its children will update as well. It works nicely for us.

Here comes one snag. If one of us opens a drawing with which we are not intimately familiar, we don't know which mleader is the parent of which children. There might be fifty parents and four hundred children in a drawing so going through them by hand is a big productivity drain.

What I need to do is write a routine that will let the user select the mleader that includes the field and have the routine highlight and/or zoom to the parent object.

I thought I should be able to find that info in the dxf codes for the mleader, but I am either missing it or it's not there.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Find DXFIN Command Code?

Sep 22, 2011

Where I can find the DXFIN command code? I want to examine it to see how it does what it does.

View 2 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 :: Find A Block And Get Its Insertion Point?

Jan 27, 2012

How can I find a block with a specific name and get what the coordinates are? What we have is our Bill of Material is attributed blocks. I am attempting to change the first one. Well all of the lines that list the parts are seperate blocks with the same name. Now the Top Line of the Bill of Material is a different named block. If I can find the coordinates of this block I can then select the first line to do what I need to.

If needed: AutoCAD 2013 User using Visual LISP for editing LISP and DCL files Also I have AutoCAD 2011 currently still available for us, but we are using AutoCAD 2013 for 99.9% of AutoCAD use

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Find Text And Get The Filename Where It Occurs

Jun 24, 2012

Actually I am not a Autocad Lisp person but I need to refer Autocad drawing for my workflow.

Is there a way in Lisp to find a certain, text or attribute in all files in a folder and if the file

contains that text to get the filename written to a txt file.

Config :: Intel (R) Xeon (R) CPU E31245 @ 3.30 GHz, 16.0 GB, 64bit win7
Inventor 2013 and Vault Basic 2013

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Find Duplicate Text String

Jun 11, 2007

In order to avoid duplicate text string in different places in the same drawing, I would like to have such a tool to find duplicate text string.

For instance, I want to put numbering of some connection lines, I do not want to have different lines but have same number by mistype.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Find And Replace Multileader Text

Jan 25, 2012

I'm looking for a lisp routine that can find and replace multileader text.

I want to replace "T." with "T+" and "B." with "B+".

All the multileaders are on layers with a suffix of "-elev".

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Find Start And End Point Of AEC WALL

Jan 29, 2003

Using Lisp or VLisp, how can I find the Start & End Point of an AEC_WALL ent. ?

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Find One Of Corners Of Viewport Outline

Feb 2, 2012

Further to my earlier topic for getting the viewport scale which has been nicely solved, I am looking for a way to get one of the corners of the viewport outline 'drawn' in modelspace so that I can add the name of the spcific layout Tab to which it relates in a location that suits the drawn outline.

The code that I am adapting came from the thread titled Outline projection all viewports to model..The routine appears to pick up the corners of the viewport in paperspace and tranform/translate them to modelspace co-ordinates.

  (defun _trans (p) (cons 10 (PCS2WCS p ent))) (defun _cornersFromBBox (o / a b) (vla-getboundingbox o 'a 'b) (setq a (_trans (vlax-safearray->list a)) b (_trans (vlax-safearray->list b)) ) (list a (list (car a) (cadr a) (caddr b)) b (list (car b) (cadr b) (caddr a))) ) (if (setq ss (ssget '((0 . "VIEWPORT"))))
[code]....

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Have Routine To Find Polylines That Are Overlapping

Feb 26, 2010

I work with polylines a lot to maintain Facility Space and I come across polylines that are overlapping. Is it possible to have a routine to find polylines that are overlapping? Sometimes I really have to zoom in pretty close to see if they are overlapping and sometimes it's pretty obvious.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Find Position XYZ And Rotation XYZ Of Each Entity?

Jul 13, 2011

finding each objects Position XYZ and Rotation XYZ using LISP.  It looks like position is a pretty easy one but rotation data is a bit elusive.  

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Find Duplicate Text / Highlight With Any Color

Nov 27, 2013

find duplicate Text & highlight with any color (numbers or text string) ? I have a drawing and have to find duplicate text string, file is bigger and need make this automatic find, & highlight the duplicate text.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Find And Replace Group Of Blocks That Are SELECTED

Jul 17, 2013

I having real difficulty finding a lisp that will find and replace blocks.  There are plenty out there and AutoCAD 2013 and lower has a Find and Replace Blocks.  However, the frustrating catch is I can seem to find a routine that will allow me to replace only those blocks that I select with a selection set of my choosing.  The built in function replaces all of them and will not let you exclude some.  We have PID drawings that we want to replace valves on, but not all valves.  We don't want to rename.  We don't need to BEDIT the existing block. 

1) Pick group of blocks

2) specify a new block that will replace all instances of old block

3) replace inserted block with different block.  Leaving others alone.

I'm thinking this should be easy, but my search has failed.  The blocks in question are not dynamic or attributed either.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Find And Replace Unique Attributes Using Script?

Jun 7, 2010

I have a “PART” block with attributes tags “PARTMARK” and “SHEAREDFROM” inserted 5 to 10 times in 10 to 50 drawings.

The “PARTMARK” value is always a unique number entered in autocad.The “SHEAREDFROM” value is calculated in Excel and exported to a “SHEARED.txt” file.

In each “PART” block I need to replace the “SHEAREDFROM” value based on the unique “PARTMARK” value, using a script that uses (or incorporates) the values from the “SHEARED.txt” file.

So far the only solution I’ve come up with is having a unique value for the “SHEAREDFROM” and –attedit to change the values in a script. However if the script doesn’t encounter a "K20-1S" in the first drawing it errors out and doesn’t proceed to the next. Below is an example of my rudimentary script.

(command "-attedit" "n" "n" "PART" "SHEAREDFROM" "K20-1S" "K20-1S" "8-60x192")
(command "-attedit" "n" "n" "PART" "SHEAREDFROM" "K20-2S" "K20-2S" "2-60x144")
(command "-attedit" "n" "n" "PART" "SHEAREDFROM" "K20-3S" "K20-3S" "2-60x132")
(command "-attedit" "n" "n" "PART" "SHEAREDFROM" "K20-4S" "K20-4S" "4-60x120")
(command "-attedit" "n" "n" "PART" "SHEAREDFROM" "K20-5S" "K20-5S" "0.7-60x120")

I’m assuming I need LISP to do this, but my LISP skills are limited. I think I would need a setq for each unique shearedfrom value (setq K20-1S (“8-60x192”))? Then somehow search each drawing for the unique shearedfrom value to replace.?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Find The Fore-most Point Of A Group Of Entities

Feb 15, 2012

I have a lisp routing that the user has to use, to create a ucs, that is exactly on the front of the entity the user selects, so that whne they are drafting, labeling, dimensioningn the 3D entity, none of the drating lines are hidden when plotted.

The code is as follows:

(setq obj (vlax-ename->vla-object ent))

(vla-getboundingbox obj 'LowerCorner 'UpperCorner)

(setq LowerC (vlax-safearray->list LowerCorner))

(setq UpperC (vlax-safearray->list UpperCorner))

[code]...

Then I do a condition to see which points are greater than others, and move the ucs depending on the view to the foremost point.  The program works perfectly.... however, often, they forget to use it.

I was wondering if I could incorporate it in another lisp that everyone uses, but not having the user pick the entity they want to be in front of (sometimes they pick the wrong entity).  Instead, take the group of entities (anywhere between 1 to 30 per drawing (these are piping spools, so the entity count is not that great in model space)) and set a front working plane in model space.  Working in paperspace is not an option, we're just too deep into our templates and processes.

I know there is a vmin and vmax, but they are for the X and Y axis, a VMax along the Z-axis would be great.

View 5 Replies View Related







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