AutoCAD Visual LISP / AutoLISP :: Creating A PDF And Putting It Into The Windows Desktop?

Dec 2, 2011

cannot find a way to create a pdf and saving it into a desktop.  Basically, in the -plot command, there should be an option to allow it to save to C:documents and settings"username"desktopfilename.pdf"

See the command line used:

(COMMAND "-PLOT" "Y" "" "DWG to PDF.pc3" "30 x 42" "Inches" "Landscape" "No" "Extents" "1=1" "CENTER" "Yes" "Fullsize.ctb" "yes" "No" "No" "No" "C:\Documents and Settings\Username\Desktop\Filename.pdf" "N" "Y")

The objective is to allow the lisp to plug in whichever username and automatically creating a pdf based on the filename.

View 3 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Plot In A File Some Windows?

Jan 24, 2001

I need to plot in a file some windows from a LISP, like (command "-plot"...

The windows are defined in a list of points like (((0 0 0)(10 10 0))...) defining lower-left and upper-right corners. Each .plt file must be saved with a different name.

Is it possible from AutoLISP in 2000?

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Draw Doors And Windows In 3D From Block In 2D

Jul 4, 2013

i make  a lips that  draw doors and window in 3d from block in 2d......the problem..It does not work in all autcad¡¡ the same version but different  pc.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Different DWG Version Icons In Windows Explorer

May 23, 2013

Back in the day, there was an application that showed the drawing version # in the icon in windows explorer.  That was good for then, because of the lack of object data in many of the vertices.  The link I have isn't valid anymore and it didn't work in Win7.   

What I'd like to have is something that will show the different Acad versions related to the icon using the product ID, for example:

ACAD-5xxx = 2007 
ACAD-6xxx = 2008
ACAD-7xxx = 2009
ACAD-8xxx = 2010
ACAD-9xxx = 2011

then in 2012 they changed to Axxx

2013 = Bxxx (???) I dont' have 2013 loaded
2014 = Dxxx (what happened to Cxxx?)

With the lack of backward compatibility between versions for objects (and I totally get that), it would be nice to be able to tell by an icon which version was used to create the drawing.  I know the version information is stored in the header, which can be read, I'm just not a programmer.  

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Custom Plot From Windows Explorer

Jan 27, 2012

Goal: using the native windows explorer, Open the folder containing the the multitude of drawings from different vendors and customers, usually 30 -40 .dwg files.

Highlight all the files, Right click print.behind the scenes without any further clicking or involvement from the user autocad plots the extents of model space of all the drawings to a designated plotter fit to 11x17 sheets. 

Acad 2012
Win 7

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Creating Drawings From Excel

Dec 16, 2011

This probably isn't the correct discussion group but not sure where else to post this. 

My sales department wants to be able to create drawings based on entries in selected in their Excel qouting tool.  Basically, they want to configure a product in the field, and be able to show the customer the drawing with TrueView. (They don't have AutoCAD installed).

I would think the best I can do, is manipulate a .dxf file based on their selections but that may get very complicated.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Creating Variable Names

Nov 28, 2008

How to write some code which could create variable names like var1, var2, var3, etc. I need to do this because I have a large number to create and the actual number is variable and unknown.

Instead of manually writing a large number of line like

(setq var1 value1)
(setq var2 value2) etc

I used to be able to put 1 line in a loop to create and assign a large number of variables. I remember that it involved the use of the set (not setq) and read functions.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Creating An Export Command?

Feb 11, 2013

I am attempting to create a export command for our surveyors that deletes all there point layers and seal layer, then audits and saves the file before opening the etransmit command.

Below is what I currently have.I know there is a better way to do this, but it is above my programing skill right now.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SURVey export(defun C:SRVY () (command "-laydel" ; Delete Survey data "Name" "F0" "Name" "F1" "Name" "F2" "Name" "F3" "Name" "F4" "Name" "F5" "Name" "F6" "Name" "F7" "Name" "F8" "Name" "F9" "Name" "F10" "Name" "F11" "Name" "F99" "Name" "SHEET-SEAL" ENTER "YES" ) (command ".audit" "y") ; Audits file (command "_qsave") ; Save changes (command "-etransmit" "Choose Setup" "ACAD2010" "Create transmittal package" ) (princ))

AutoCAD Civil 3D 2012 (Primary), 2011 by contract.

Dell Percision T3500: MS Windows 7 64-bit SP1; Intel Xeon CPU W3505 @ 2.53GHz, 12.00 GB RAM, NVIDIA Quadro 600

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Creating Hatch Pattern

Nov 4, 2012

i'm newbie in customizing tools in autocad especially in creating hatch pattern. i understand that to create new hatch pattern is by adding a new hatch pattern in acad.pat file with specific angle.

my question is is it posibble to create a hatch pattern that can use specific angle follows the object shape?

This is what autocad can do by default this is what i'm trying to create

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Creating Object Using Entmake

Nov 12, 2013

I am creating a line using entmake, but I need the start and end point to be variable that was already defined  ex.

(entmake '((0 . "LINE")(8 . "FIELD") (10 . line_insert) (11 line_end)))

Command: !line_insert
(29.2813 20.5 0.0)

Command: !line_end
(29.2813 18.5 0.0)

The error I get is

; error: bad DXF group: (10 LINE_INSERT)

What do I do to make it recognize this variable?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Creating Formula In Block?

Oct 24, 2012

I've been fighting with building a formula in a block utilizing a field from another block. I have a support steel member that once placed, will be lengthened. I need a distance from center of the pipe to the top of concrete. I created a block with a field referencing the insertion point (center of pipe) it works fine giving me this elevation. I also have another block that is the datum node. I have several fields in this block, and it is located at the bottom of the support steel plate. I am trying to create a field that takes the center of pipe elevation and subtracts the datum node elevation to get a distance. I created the formula referencing the COP elevation field and the elevation of the datum node. The information shows properly where I am building the formula, when I click evaluate, the Preview gives me ##### and when I create the datum node block that is also the output I get. I can't figure out why it won't give me the difference between the two elevation fields. I don't know what I can do differently to have that information in the datum node.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Load LSP File Named For Windows Login

Sep 14, 2012

If my windows login name is HSIMPSON and i have created HSIMPSON.lsp in a Supported Directory, how do I load that Lisp file via the command line?

I have tried:

(load "loginname")

but that doesn't work because the 'load' command seems to want an explicit name, not a variable name.

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Open Windows Folder Of Current Drawing?

Jun 5, 2013

How to create lisp which i can simply type in to the command bar so that the current drawing's filepath-folder will be automatically opened by windows explorer?

running AutoCAD 2012 / Windows 7...

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Creating New Drawing With Specific Template

Sep 20, 2013

I have some code that starts a new drawing with a specific template from a lisp routine

(defun ghd:load_newdwg (template / ae-acad-object newdwg)
  (setq ae-acad-object (vlax-get-acad-object))
  (setq newdwg (vla-add (vla-get-documents ae-acad-object) template))
  (vla-put-activedocument ae-acad-object newdwg)
)

The template location and file is stored in variable clienttemplate (and is not the standard template path set under options). All works okay except if I close the new drawing, when I return to the previous drawing that was current when the new drawing was created (i.e. the drawing that the routine was run from). I get the following error:

Command: ; error: Exception occurred: 0xC0000005 (Access Violation)
; error: Unknown exception occurred
; warning: unwind skipped on unknown exception

I assume this has something to do with the original routine not closing/finishing before switching to the new drawing. This is the last line of the routine:

(cond ((= startnewdwg 1) (ghd:load_newdwg clienttemplate)))

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Creating Menus In Command Prompt?

Nov 22, 2011

I am able in lisp to create a command prompt selection menu, easy (see code below).However what I want is for the lisp to be ready to undertake an action UNLESS I select an option.

An example is the offset command wich has a function ready to roll (namely the specify offset distance) "OR" I can interrupt the "specify offset distance" and enter one of the sub options (in the case of offset Through/ Erase/Layer).

My code attempts to offset also, UNLESS the user wishes to specify a distance.
 
(DEFUN C:loadoffset ();CREATING MENU FOR SUB COMMANDS [GETIT] [GOTIT]...(setq choose (getstring "
Select an option... [1=GET DIST] [2=GOTDIST]: "))(if (or (equal choose "1"))(GETIT))(if (or (equal choose "2"))(GOTIT));TERMINATING SELECTION MENU...)(defun getit ( gotit )(setq MYDIST (getdist "
SELECT A DISTANCE: "))(gotit))(defun gotit ()(command "_offset" MYDIST pause pause"exit"))

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Creating Array Using Split Function?

Jan 10, 2013

In asp I'd write:

arrFileName = Split(DrawingName, "_")

JobNumber = arrFileName(0)
DrawingTitle = arrFileName(1)

SheetNumber = arrFileName(2)

I'd like to do the same thing in lsp. I don't want to be limited to three fields so the split function is perfect.Is there an equivalent?

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: CANNOSCALE / SCALELISTEDIT Creating And Setting?

May 6, 2007

I would like to be able to check if an Annotation Scale already exists and if it doesn't I would like to create it using the SCALELISTEDIT command and then set it to be the curent scale. I then plan to invoke the MLEADER command.

I do not want to have to rely on adding every possible scale in the list beforehand as my program would fall appart when a user decides to set an unusual scale I haven't thought of adding to the list.

See my initial start of the program.

(defun C:MLD ()
(command "cannoscale" "1:55") ;STOPS HERE WHEN 1:55 DOES NOT EXIST
(setq IfAnnoScaleExists (getvar "CANNOSCALE"))
(command "-scalelistedit" "add" "1:55" "1:55" "e")
)

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Creating Two Closed Polylines From One Shape

Jan 4, 2012

I have a series of boxes or polygones that I would like the program to find the 1/2 distance and create two seperate polylines from the one object. 

Example: 

I have a square with pt1,pt2, pt3 and pt4 respectively.  After I have ran the program it would create a diagonal from pt1 to pt3 and join the rest of the lines now to create the one polyline. Also it would do the same to create another exact polygonal shape for the other half. Thus creating two shapes of equal value from one.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Creating Trigger That Is Stored In DWG File

Aug 21, 2012

What I need is a trigger saved within a drawing dwg file which if found will launch a lisp to run if the trigger is not present in the dwg the lisp will not run.

If memory serves me correctly the trigger was managed by creating a unique table search item saved in the actual dwg file. A start-up lisp would then search for it and if found it would run the lisp if not it would simply continue as if nothing happened.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Creating A Script To Run Multiple Routines?

Apr 17, 2012

I have hundreds of drawings I want to run through scriptpro with a script calling 3 different lisp routines.  I have the 3 lisps working independantly but can't figure out how to get them to all run in one script.

Two of the Lisps are for redefining the title block in 2 different types of drawings that have different title blocks.  The last lisp locks all viewports in all windows.  I'll attach the 3 lisps I'm trying to merge in the script.  I am not very versed in scripts and lisps so I'm guessing at least 2 of these lisps could be merged into a single lisp...

Here is what I have for the script file contents (which doesn't work):

(load "redefine100")

(load "redefine102")

(load "vlocker")

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Creating Solid Rectangle Shape File

Sep 8, 2011

I want to create a custom linetype that uses a solid rectangle 0.5wide and 1.0 long.  Basically I want to create a shape file from an existing block I have so that I can insert it into the linetype definition.  Is there an easy way to do this in ACAD 2009?

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Creating And Modifying MESH (SubDSurface) Entities?

Dec 25, 2012

I have uploaded the handout for my AU2012 class to Google Drive. The link is [URL] It contains the detailed explanation for all the source code used in entmake-ing and entmod-ing the new MESH (aka Subdivision Surfaces) entities. [URL]

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Creating Stacked Fractions For Dimension Override

Sep 30, 2011

I wrote the code below (allow the user to pick points in different viewports and then override an existing dimension's text with the difference in X values.  The (hopefully) last issue is that the fractions should be vertically stacked and at 100% text size. 

(defun c2text ()
(command "mspace")  
(setq p1 (getpoint "Select left point "))

[Code]....

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Creating Routine Or Script To Change Pen Weights

Apr 26, 2013

Creating either a Lisp or a script to change the pen weights of two layer in autocad 2011?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Creating (arrow) Block With Two Points For Positioning And Orientation

Jul 13, 2013

I'm trying to create a model of arrow with which I could place in drawing in any length and orientation I want with lisp. I was imaging to place two point on this arrow and by placing the two points on my drawing, the length and orientation of the arrow would be define.

I'm trying for hours to create it and my grip for polar stretching don't stay still on my arrow (suppose to be on the peak but go far if I stretch it).

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Creating A Riser From Blocks Inserted On Floor Plan

Apr 25, 2013

I'm looking for an easy way to generate a on-line riser diagram of blocks that have been inserted on a floor plan.Here's what I was thinking.

For every instance where the block  SLC_DEVICE IS insert on the drawing, the routine would insert the block listed in the "TYPE" and place text equal to what is listed in the "ADDRESS".  The TYPE is the actual block name.

Each one of these blocks have a tag of TYPE and ADDRESS.  What is in the TYPE tag is the block name of what should be inserted and what is in the ADDRESS tag is the text that should be inserted under the block.

So for example; the routine would find the first instance and the tag TYPE which is "Smoke_Detector" and the tag ADDRESS which is 01:03:001.  The routine would insert the block "Smoke_Detector" with the text "01:03:001" directly under it.  It would insert the next instance the same way a specified distance from the last; so on so on so on until all instances of the BLOCK (SLC_DEVICE ) have been inserted.

The other part of this would be the Block "NAC&SPK_Circuit" but you would use the Tags "Type", "Candela" AND "NacCkt" to generate the one liner.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Do Lines / Polyline On Line Edges Creating Polygon

Oct 22, 2013

I really need a auto lisp that do lines/polyline on line edges creating a polygon like the example.

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







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