AutoCAD Visual LISP / AutoLISP :: How To Retrieve Action Recorder File Location

Nov 10, 2011

Using (setq Filetab (vla-get-files (vla-get-preferences (vlax-get-acad-object))))(vlax-dump-object Filetab) returns most pathname as specified under Options. However, the Action Recorder path is missing. How do I retrieve this path?

View 1 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Retrieve Cell Data From Excel File?

Oct 7, 2011

I would like to be able to retreive data from a sepcified cell, in a specified worksheet, from an excel file.

I don't have any clue how to connect to an excel file and read the data. Most seems to think you already had an understanding but I'm starting from the beginning.

View 5 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 :: Set File Location From Shared Dropbox Folder

May 10, 2012

I would like to put our company programming on a Dropbox folder.  I have not fully tested everything out yet, like locations of lisp files and image name...

One thing I am struggling with is an absolute path in my lisp file:

(setq FL:FLAYTAB "C:\Users\dvanerem\Dropbox\Canova and Stone\Customizations\Autodesk AutoCAD 2010\Programming\OENV-RCP.TAB")(FL:LoadTable)

I am confused how this would work with other users? Or does AutoCAD automatically correct for this? 

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Retrieve Layer States

Mar 14, 2012

How can i retrieve the layer states via lisp.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Retrieve Today Date

Jul 17, 2012

How can i Retrieve today date through Lisp.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Retrieve The SSGET Output

Jan 9, 2013

I try to use the SSGET function, and it returnes a string.

How to access the data?

Which function to use?

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Retrieve (2) Attribute Values From One Block

Aug 24, 2011

Here's my situation:

I have a block named "WIDGET-A". And in that block are (4) attribute tags whose names are:

"ID"
"TAG01"
"TAG02"
"TAG03"

The user will be prompted to pick the value displayed at any of the "TAG##" attributes - they will select the attribute tag they want (we don't know which one it is, we just want to assign that value of the attribute tag they clicked on to a variable called "VAR2".

Now, what we also want AutoCAD to evaluate, behind the scenes, is the value of the attribute tag named "ID" which we know always exists in the block and then assign that value to a variable called "VAR1".

Is there a way for AutoCAD to do this all from only a single user pick on top of an attribute value, in a block whose name isn't always going to be 'WIDGET-A' either.... But the block, whatever it's name, will always have the attribute tag "ID" with a value in it, and we always want to capture the value of whatever attribute tag within the block that the user clicked on.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Retrieve Arc Length From Revision Cloud?

Oct 28, 2011

Is there any way to retrieve the arc length from Revision cloud and how can we identify that object is a Revision Cloud.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Retrieve Length Value Of Single Entity

Feb 27, 2012

When we launch the list command, the Area system variable holds the area value of the selected shape.

How to get the length value into an Autolisp program to use it?

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Possible To Retrieve Names Of All Nested External References

Sep 20, 2011

is it possible to retrieve the names of all the nested external references, and how should it be done?

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Geo Location And Current Sun Position

Jan 11, 2012

Where is this data stored?

Geo Location

Sun Source vector (I can see it in the "Sun & Location" Panel)

But how use this data.

In attachment you will see sample drawing with all this information.

How can I find them with lisp?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Changing Destination Location Of Routine

Sep 20, 2012

I am currently using this lisp routine to export selected objects as a dxf to import into another program:

(defun c:dxf ()
(command "_dxfout"
(getfiled "DXF File:" "c:/dxf/" "dxf" 1)
"_Objects" (ssget)
"" ; completes selection
"_Version" "2004"
"16" ; non-default number or other option if desired, with followup line(s) if
necessary
)
(princ "2004 DXF Created")
(princ)


this saves the dxfs to a location of C:DXF

I would like it to save to a different location, the desired location is within the same root folder that the drawing is located in and is called "DXF-Programs-Releases"

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Set Variable Depending On Location Folder (find Directory)

Sep 20, 2012

We have user folders on severall servers, now I want the user menu's to be stored on the network so their home folder depends on what server it's located on. I tried using the vl-file-directory-p command but it doesn't seem to work.

Even worse, as soon as the userfolder is found I want to let the script check for a file called user.cuix in the Acad folder and if it doesn't excists copy it from another location to that folder (if possible).

This is what I got so far:

(setq UserName (getvar "loginname"))
(setq RootZW "\\users\zw\")
(setq RootVL "\\users\vl\")
(setq Company "\\CADConf\ACAD13\")

[Code] .......... 

Next to this we have 4 other options as well, but to keep it short I left it at the first 2.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Routine To Substitute Text To Blocks At Point Location

Aug 17, 2012

i found this valuable script Lisp routine to insert blocks at point locations and want to modify it but i do not know much about lisp ...

what i want is :

1) script start and asks for a Block Name (in this case QPP1, QPP2, QS, QE, ect)

2) the user picks existing text  

3) the script reads the value existing on this text an put it in a variable

4) then erases the pre picked text

5) inserts the block chosen

6) changes block value to number value pre-read

since it do almost all steps except for step 3 and 6

View 4 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 :: Export Each Sheet In Excel File To TXT File

Dec 4, 2012

I am trying to export each sheet in an Excel file to an separateTXT files.

I currently have code to read each cell in a sheet, but unfortunately some of the Excel sheets have in excess of 5000 cells and it is taking too long to read. So I am switching to another method.

The program will check dates of TXT files and XLS file to make sure TXT files are current (if not, open and recreate TXT files).Then read the TXT files (much faster).

Where I am getting stuck is 2 places -

Get the names of each sheet in the excel file (not always a known name)

Save each sheet as separate TXT file.

Here is condensed code so far without error checking, etc -

(defun E2TXT (FileName /)
(if (and (setq XLfile (findfile FileName)) (vl-file-systime XLfile) (setq XLapp (vlax-get-or-create-object "Excel.Application")))
(progn

[Code]....

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: File Is Not Read Only / And Permission On File Appear To Be Just Fine

Aug 20, 2013

(if (findfile MyFile)
  (setq fl (open MyFile "a"))
)

the file exists however the open function still returns nil... the file is not read only, and permission on the file appear to be just fine.What other reasons would there be that cause open function to return nil?This is happening only on one machine. All the others are writing to the file just fine.

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Writing File Path To TXT File

Dec 20, 2012

I have a file path im trying to capture in a text file however its not working and autocad is prompting back,

; error bad argument type: streamp nil

 Im assuming its because of the slashbacks but Im not sure..

Hence the code so far...
 
(defun C:GO ()(SETQ ACADLSP (findfile "acad.lsp"))(setq f (open "C: est.txt" "w"))(write-line ACADLSP f)(close f))

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Script File To Open Multiple DWG File Not Working In 2012

Dec 22, 2011

I am trying to make a script file to open a drawing and run a lisp routine. They both work independently just fine, the script file will open the all of the files fine... and the lisp is in the startup suite and works in all the files. But when I tell the script file to open the first drawing then run the lisp it hangs trying to open the next file after running the lisp. I have Filedia set to 0, but the message I get when it goes to open the next is "No canvas exists. click New Canvas." (And on top of that... Filedia even set back to 1 still does not display the Dialog box anymore, I have to shut down AutoCAD 2012 and start again then it works.) I Have tried several ways, Opening one at a time then run lisp, and open all files first and then try to run lisp (that closes the file after running) and try and run it again in the next... It will only run the lisp one time and then locks up from there.

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Combine All PDF File To One File

Sep 3, 2012

I have more DWG files, all dwg file convert same size (A3 SIZE) PDF file and combine one PDF file. Find script program or lisp program.

I have script program for convert dwg file to pdf file but i don't know all pdf compile one pdf file.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: File Not Found (CI)

Sep 21, 2012

Autocad 2008. Certain command and mouse control unable function.. which the error dialog box  shown when start up launch the autocad...

" Customization file load failed. File not found: COMMANDLINE.cui

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: File Name In A List

Aug 26, 2012

I have a list like ("a.dwg" "b.dwg" "c.dwg") and an filename "b.dwg"

I want to know if the file name is a part of the list. which function must be used for this?

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Corrupted LSP File

Dec 31, 2011

my LSP file. My computer is stolen and i have a backup in flash memory. I just wanna run it but i think it is corrupted. When i open it, it has codes like.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Bind JPG In Same DWG File?

Sep 24, 2012

Now i attached more logos in the drawing file. The logos all in JPG files.This all jpg files in different locations. Every time i sent file to email attach with all jpg files. Some time i forget the attach files. So i need 'how bind all jpg files in the drawing file'. Now i am working with AutoCAD 2013.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Macro In MNL File

Aug 27, 2013

I used to have a short, one-line macro in my MNL file that would read the location of the currently active drawing, find the parent directory of that drawing (truncated to 3 levels) and open a Word document in that directory that is named after the project.

For example, if the active drawing path is

"Q:/Projects/12345 Cold Storage/Elevations/Phase 1/North Storage.dwg"

this macro would open the Word document named

"12345 Cold Storage.doc"

that was in the directory

"Q:/Projects/12345 Cold Storage"

If the file did not exist, it would be created named the same as the 3rd level directory.

After i wrote this, it sure sounds like a lot, but as i remember, it was a short, one-liner. Of course if a lisp routine would be better, that's okay too. I understand beggars can't be choosy.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Create TXT File

Apr 3, 2012

Looking for example of a lisp file that take the value of a variable and create a txt file on a specific place defining by the user, with 10 lines in each one of them begins with what is in the variable, followed by a text already done.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Save File As TXT?

Oct 30, 2013

I have a Lisp program that is reading information from a .txt file. The problem is, the file we get is an .edi file extension, and right now, the user has to manually change it to a .txt file for the program to run. Can I get autolisp to save the file as a .txt?

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Opening DWG File

May 17, 2012

Right now I'm working on a program that will go into a directory and it's subdirectories, collect a list of all the .dwg files in those directories, then apply certain changes to all of those .dwg files. 

My problem is that none of these things works.

(command "open" (srtcat basedir (nth i file)))
(command "open" (nth i fullfile))
(vl-cmdf "open" (strcat basedir (nth i file)))
(vl-cmdf "open" (nth i fullfile))

Where "basedir" is the main directory (e.g. C:/...), file is the list of the dwg file names (e.g. mydrawing.dwg), fullfile is the list of the ull paths (e.g. C:/.../mydrawing.dwg)

I have tried using the filename with and without the .dwg extension with no luck. 

I have this code set in (while ...) so that it will go through all the files in the list "file" or "fullfile" in sequence.  The lisp will run without errors but will not open any of the files.  When I look at the command line, I see that the lisp has put open on the command line like it has executed the command, but right below that, it says "Unkown command: C:/.../mydrawing.dwg" or "Unkown command: dwg" depending on which of the above code pieces I'm using.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: File Doesn't Run

Aug 28, 2013

I have an AutoLisp file that runs fine with AutoCAD Core Console 2013.  It runs fine when loaded through the standard interface of 2014.  However, it does NOT run using AutoCAD Core Console 2014.  I know there are new security features in 2014.  What has to be done to allow it to run in 2014 AutoCAD Core Console?

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Create VLX File

Aug 6, 2013

how can i create single " .vlx" file from my lisp and dcl files?  how to convert my lisp to vlx ?

i have to collect my all lisp into the single .lsp file and than convert to .vlx? if it is gonna be like that how about dcl file ?

View 1 Replies View Related







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