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


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Delete Files Named In List

Aug 19, 2012

I have list like (C:projectspr0310.dwg  C:projectspr0315.dwg C:projectspr03drawings17.dwg)

Want these three files deleted from C:projectspr03.

View 9 Replies View Related

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 :: Freeze Layers In Viewports On Named Pages?

Jun 24, 2013

I am in need of a LISP to freeze layers in viewports on named pages. I found the following functions to return the frozen vport, but it only returns the list of already frozen and it only works if the viewport is active; besides just listing the frozen layers isn't enough. I need to be able to supply the page/tab and a list of layers to freeze.

; by Jürg Menzi 1999(DEFUN GetFrozenLaysInVport (/ LayLst) (FOREACH memb(GetMviewInfo) (IF(= (CAR memb) 1003) (SETQ LayLst (CONS (CDR memb) LayLst)) ) ) (REVERSE LayLst))(DEFUN GetMviewInfo (/ ActVpt CurSet IDX RetVal TmpVal) (SETQIDX TActVpt (CAAR (VPORTS)) ) (IF (OR(= ActVpt 1)(= (GETVAR "TILEMODE") 1) ) (SETQ RetVal nil) (PROGN (SETQ CurSet (SSGET "X" '((0 . "VIEWPORT")))) (WHILE IDX(SETQ TmpVal (ENTGET (SSNAME CurSet 0) '("ACAD")))(IF (= (CDR (ASSOC 69 TmpVal)) ActVpt) (SETQIDX nilRetVal (CDR (ASSOC "ACAD" (CDR (ASSOC -3 TmpVal)))) ) (SETQ CurSet (SSDEL (SSNAME CurSet 0) CurSet))) ) (SETQ CurSet nil) ) ) RetVal)

Is it possible to provide the page/tab name and a list of layers as aguments to a subfunction that could either activate the viewport and freeze a list of layers, or simply freeze the layer list for the named page's/tab's corresponding vport.

Important: most of my pages/tabs contain at least two vports. The largest of the two vports is the only one I wish to change, but if the layer list is frozen on all vports (per page/tab) it will make no difference because the smaller vport only requires that layer 0 is visible.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: CANNOSCALE Value Needs To Match Existing Named Scale

Jan 18, 2012

The crux of the matter is that the CANNOSCALE value needs to match an existing named scale.  This lisp is part of a bigger lisp and I need to pass a variable into it.  Here's what I have:

(setvar "CANNOSCALE" (strcat "1" = " (rtos variable 2 0) "'"))

But I get this error when I try to run it.

; error: bad argument type: numberp: nil

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Font Of Named Attribute Throughout Drawing

Sep 25, 2012

how to change the font of a specific attribute in all my blocks in a drawing.  I am trying to change the INST attribute font to Arial but I have thousands of them through out my project.  My other attributes that I do not want to change are using the same Style as this block so I can not simply change the style.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Move A Named Block Left 5 Inches

May 24, 2012

I'm dabbling in lisp to reduce some drafting time. I'm looking for a way to move a named block left 5 inches. The names block in this instance is "Bricks". What would be the easiest way of writing this in lisp form? I searched through the forums and I couldn't find what I was looking for. This is not after an insert command. This is a block that currently exists in the drawing template.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Can Add Named View Control To Quick Access Toolbar?

Dec 8, 2011

I've made a failed attempt to add the RIBBONCONTROL Named Views to the main Quick Access Toolbar. The Customize User Interface dialogue box (CUI) seems to allow me to drag the Named Views  RIBBONCONTROL from the command list to Quick Access Toolbar 1. I don't see the "forbidden" icon and the blue insert bar shows up when I perform the drag operation.

However, I suspect there is some compatibility issue, because the command doesn't pop up when I release the mouse button at the end of the drag operation. Using command QUICKCUI and trying to drag Named Views RIBBONCONTROL directly to the Quick Access Toolbar (on screen) seems to be allowed likewise, but doesn't work also.

Using the regular View Manager Dialogue is not the kind of solution I'm looking for, because in the View Manager it takes at least twice as much mouse clicks to change to another view.

Any way to reach the desired customization? Should it be reported as a bug to Autodesk?

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Load ObjectARX In OEM

Oct 11, 2011

I meet problem with autocad OEM, I don't know how to load arx in  autocad OEM, I'm using visual stuido 2008 sp1 for building example arx and then i will load it in autocad OEM. I use command "arx" to load it, but it not work.I have a list arx files, i want it auto load list arx files when i start autocad OEM.I can't the way for it. i'm using  AutoCAD OEM 2011.

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Trying To Load Express Tools CUI Twice

Mar 8, 2012

i had my enterprise CUI working fine, and then one day it blew up and now everyone gets an error that autocad is trying to load acetmain.cui but it's already loaded. do i need to load acetmain.cui as a partial cui?  i figured that i did, but then why does acad try to load it twice?

so i have the enterprise cui loading the acetmain as a partial.  when the users log in, the enterprise cui is in loaded AS their enterprise cui in the Support Paths but then they load their own custom cui as the Main cui on their individual workstations.  THIS cui ALSO is loading the acetmain.  i think that's where the conflict is.

if that's the case, should i just give out instructions on how to remove the acetmain from their personal "custom" cui?  it seems that if i take acetmain out of the enterprise cui, that the entire menu disappears from teh individual workstations.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Routine To Load Particular Object Snaps?

Jun 20, 2011

A lot of the LISP routines we use turn off all snaps except the "nearest" snap when the routine is complete.

I draw with 6 out of the 10 snaps on (not the nearest).

LISP routine that loads specific object snaps?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Object Reactor And Load Function LSP

Mar 13, 2012

I open the drawing without loading the function, when I modify an object with the reactors appears the following error message:

function definition: NAMEFUNCTION

You can avoid this annoying message without removing the persistent reactors? 

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Failed To Open Project After Load?

Aug 23, 2011

We have stored lisp in fileserver which 30 users can access it. Now a day some users have getting the ‘failed to open project’ error after load the Lisp due to this they r also not getting most of the commands. The full rights have been given to appropriate folder which contains (Autolisp application source file, .vlx, Autocad VBA source). It has working for limited users (8-10 users).

Server OS: Windows server 2008

Note: Previously we had used windows server 2003.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Save Workspace And Load Onto Another Machine

Feb 29, 2012

How to save my workspace and load onto another machine? Both systems are running AutoCad 2011 and may soon change to 2012.

I figured out how to customize the ribbon and panels, and I even customized my shortcut menus. I then created my Workspace and "Saved As". Now how do I get this workspace loaded onto my Laptop with a seperate AutoCad License?

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Get Separate Block To Load If Third Number Entered When Prompted

Aug 23, 2011

I am wanting to get a separate block to load if a third number is entered when prompted. If enter is hit or only 2 of the numbers are entered, load the other block. I couldn't even get it to do right by even equaling a specific number.

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Message Not Showing In Console When Load Active Edit Window

Aug 2, 2012

I'm working with our new copy of AutoCAD 2013 and using the Visual LISP IDE to create code. I also have an AC2009 machine right next to me for other tasks. On the 2013 machine when I click the "Load Active Edit Window" button it switches to the console screen but there are no messages printed like:

$
; 37 forms loaded from #<editor "C:/LISP/My-Lisp.lsp">
_$

This of course is making it extremely difficult to debug. I have checked the environment settings and they are exactly the same on each machine. The AC2009 machine prints the messages but the AC2013 machine is just giving me a blank console screen.

View 1 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 :: 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 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 :: 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 :: 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







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