AutoCAD Visual LISP / AutoLISP :: Change Profile Through Registry Settings

Jun 26, 2012

I'm trying to fix my profile via lisp-registry key. Why? Because the profile we use is part of a plug-in meaning we can do it using our profile so I alternatively the answer is to tweak the one supplied as part of the plug in.

The method I’m familiar with is to edit using the following code as example;

 (vl-registry-write "HKEY_CLASSES_ROOT\.PEN\Shell\open\command" "" "notepad.exe %1")
 
However that’s for creating a new registry key entry the one I have already exists but needs to be modified, better yet the profiles name (*.arg file) can change with updates, so in my search I came across the following link.
 
[URL] 

Now I cant put it together and am not sure where I have gone wrong…(See code bellow)
 
(vl-registry-write "hkcu "\Profiles\" (getvar 'cprofile) "\General\DefaultConfig" "\\DCMAR02\A03P20")

View 1 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Registry Key For Current Profile (cprofile)

May 30, 2013

Which registry Key stores the name of the Current profile ("cprofile")?
I tried following, all reurn 'nil'

(vl-registry-read "HKEY_CURRENT_USER\Software\Autodesk\AutoCADR18.1\ACAD-9005:409\Profiles")

(vl-registry-read
"HKEY_CURRENT_USER\Software\Autodesk\AutoCADR18.1\ACAD-9005:409\Profiles\(default)")

In the registry when I double-click the key, the value is displayed. But I can't access it.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Get Registry Key Value And Process It

Dec 12, 2012

I would like to capture a registry key value using autolisp if the value of they key equals TEXTEXAMPLE then exit Autocad else nothing.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Add / Modify And Remove Registry Key?

Feb 27, 2012

Some time ago I was able to add modyfy and remove regestry keys ussing AutoLISP Unfortunatly I have lost the information on how to do this.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Can't Append Registry To Value Of SAVEFILEPATH Variable

Oct 2, 2012

How come I can't modify the following registry key to the SAVEFILEPATH variable?
 
(vl-registry-write "HKEY_CLASSES_ROOT\SOFTWARE\Treadstone\File Sweeper" "NETWORK_LOCATION" SAVEFILEPATH)

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Deleting Recent Documents From Registry (DST Files)

Dec 30, 2013

I downloaded a Copy of AutoCAD Recent Documents Manager.exe from the autodesk website and it won't run on any of the computers in our system. I was thinking about writing a LISP routine to delete the filenames with a DST suffix by replacing them with the next filename in the list. My question is If I replace the file with the next one above and the filetime,filepinned and class respectively. When I reach the end of the list can I just use "" for the file,filetime and class and integer 0 for filepinned (it looks like it requires a double).

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Deployment Of Registry-Saved System Variables

Jun 10, 2013

My company is in the process of upgrading to AutoCAD 2013 (yes, I know 2014 is out, but IT won’t let us get the most recent because of fear of “new release bugs”). My company is small and our CAD Standards/Management is less than desirable. Over the past few years I have become the unofficial company CAD Manager and have slowly been getting us up to speed with using the latest capabilities and following best practices.

An issue that I deal with constantly is a new user not having the correct registry-saved system variables set up. This also happens a lot because our IT guy frequently reinstalls AutoCAD to fix issues. Every time AutoCAD is installed/reinstalled, all the registry-saved system variables are set to their default values. We have several that need to be set a certain way to match our current drafting standards (a few examples: .bak files turned off, plot.log files turned off, advanced attribute editor turned on, plot area relative to edge of paper, etc, etc.). Typically, I will get complaints from users about something not working correctly, and then I will troubleshoot the issue and eventually find out that they just had their AutoCAD reinstalled and their system variables are not set how they should be. Then I will get out my list and have them set all the variable s properly via the AutoCAD command line.

 I have read up on creating AutoCAD Deployments (and we will be using these Deployments for this upgrade), but there does not seem to be a way to set variables when creating the Deployment.

Finally, to complicate things a little more, most of our users actually use AutoCAD LT (so no Lisp), and only a select few (like me) have full AutoCAD. So, we will be creating two separate Deployment files as it stands (which is not a big deal).

Some of my preferred criteria for the solution:

-Solution can be used for both AutoCAD & AutoCAD LT (I’m okay with there being two separate system variable “deployment” files since we will already have two different AutoCAD Deployments. I would just like the procedure for deploying both packages to be the same regardless of whether it’s for LT or full version).

- Solution would be able to be applied to each workstation without opening AutoCAD on each machine (and ideally, it would all happen when the AutoCAD Deployment installer was run!)

Is there any current best practices for accomplishing this? (maybe by changing the registry through batch files, VBscript files, etc? Or using AutoCAD script files – however, this requires the program to be open to run, which I was trying to avoid).

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Visual Effect Settings?

Jun 20, 2013

Lisp that switches back on Selection Preview i.e. thickens and highlights lines when you hover over them?I don't know why, but they are always unticking the boxes.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Modification For Coordinate Settings?

May 4, 2012

i just come across a lisp and i find it quite usefull,but then i wish to modify it abit. I have attach a sample of the lisp and jpeg to show what i require.basically all i need is the leader to be in multileader type. Is it possible? Additionally, can i set by default the coordinates to be shown in just 2 decimals?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Start Profile Over From Scratch

Jan 17, 2013

ACAD 2009 on XP

Third party software installed which now causes AutoCAD 2009 to crash when a single key is pressed. We have uninstalled the software, however the editor is still looking for the

Non-existent ARX. This is the problem. What file or registry key declares the list as shown in APPLOAD? I have verified 2009 works in the administrator profile.

We also did a repair and then a reinstall of 2009 to no avail. What steps are needed for AutoCAD to build a profile when a previous profile existed?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Generate 2D Gear Profile?

Mar 4, 2013

As I mentioned above,I am here by attaching an Autolisp program to generate a 2d gear profile in autocad.

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Line Profile And Chainage

Mar 18, 2011

Any lisp programme for creating a line profile and chainage. I have attached a sample drawing. The blocks on the line have elevation and lines are drawn from the datum .If i manually draw it will take too much time.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Set User OSnap Settings Transparently

Jul 16, 2013

I have a routine that sets user defined osnaps based on a text file.Here is what is an example of user stored osnap settings -

(setq User_Osnaps (list (list "Alan" "endp,midp,int") (list "John" "cen,ins")))

Here is routine I use to set user osnaps -

(defun CU ()
  (vl-cmdf "-OSNAP" (cdr (assoc (getvar "LOGINNAME") User_Osnaps)))
  (princ)
)

This works great so long as the user is not in the middle of another lisp routine.How can I change this to a transparent command that will work to set osnaps while running another lisp routine?I would like to store it in a toolbar button.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Reset 2006 Settings Like 2013

Nov 26, 2012

We have a big issue where half our users can't open autocad. We have half running 2013 and half running 2006. For our 2013 users we've gone to our start menu and reset settings to default. and then just re-loaded our custom menus. How can I reset Autocad 2006 to default if I can't open Autocad?

We need to get people up and running.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Getting Station And Elevation From Profile View?

Mar 22, 2013

can i use  the "methods supported"   " FindXYAtStationAndElevation" to retrieve a elevation and station from a profile view?

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Odd Shape From Solid With Profile Of Polyline

May 16, 2012

Any routine that would allow you to cut out an odd shape from a solid with the profile of a polyline?The goal would be to have all the pieces that are left, not subtract them out..

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Changing Layer Settings From A Sheet Set Entry

Sep 26, 2013

for my latest little project I'm trying to change layer settings depending on a entry in a sheet set attribute.

Basically, if the sheet set custom attribute entry is 'white' I want the colour of a specific layer displayed as 255,255,255, and if it's blue I want it changed to 0,0,255. So I can control the colours from a sheet set custom properties level.

And for it to check if the layer existing in the drawing, so it'll skip the process if it's not there.

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Add Customized Menus / Settings From Standard To Architecture

Nov 12, 2013

How do I tranfer all my standard autocad variable settings into a new version of Architecture? I have my dimensioning settings, etc set a certain way in my standard autocad and now I want to start using Architecture but need all my old settings.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Lost Profile Missing Images In Palette?

Sep 27, 2012

I recently lost my windows autocad profile and i am having to start redoing the auatocad laout from scratch.  I have the xtp file for the palettes which have loaded the images in ok, however there are some palettes which have not "linked" with the images in the image folder. How to reassign every single image to the item in the palette?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Unable To Read Plot Settings From Variable In Text File

Sep 2, 2012

I’m trying to create a plot command that reads settings in from a variable stored in a text file but its becoming muddled up somewhere.

(defun c:MYPLOT ();Setting nessesary variables...(setq fname "C:/ICT/AutoCAD_Architecture_Suite_2012/CUSTOM/TREADSTONE/PEN/MYOUTPUTDEVICE.PEN")(if(setq f(open fname "r"))(while (setq MYOUTPUTDEVICE (read-line f))(close)))(setq fname "C:/ICT/AutoCAD_Architecture_Suite_2012/CUSTOM/TREADSTONE/PEN/MYPAPERSIZE.PEN")
[code].......

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Z Value Only On 3D Polyline

Aug 23, 2012

I am using acad 2010. I have a contour generator that uses 3d polylines to make contours. I get depressions or tops where I don't want them. I need a lisp routine that will allow me to adjust the z value only on any 3d polyline. I need to raise or lower the z value at any vertex and repeat if necessary. I don't need to prompt the user- I am the user.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change VP Linetype

Nov 8, 2012

In our Structural department, we use a layer called S-35-WALL-LB to denote a load-bearing wall, and what the guys typically do when they are on the sheet showing the floor above, is dbl-clk the VP to activate model space, open the Layer Manager and change the VP linetype to HIDDEN to show the afore-mentioned loadbearing walls as walls under.

way to accomplish this through a viewport...but instead of using the Layer Manager, use a lisp routine I can link to a toolbar button where all the user has to do is dbl-clk the VP, press the toolbar button, and either it will convert the default VP linetype (continuous) for S-35-WALL-LB automatically, or get the user to select an object on that layer and it changes the whole lot?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Annotation Scale To 1:2

Apr 26, 2013

take a look at the test.dwg it contains a block named 'box' (which is a rectangle) and some attributes. the annotation scale is 1:1 and i zoomed in to focus on one attribute.

change the annotation scale to 1:2 and you will see the attribute grows by 2 - that's ok! now load attmod.lsp and run attmod command and you will see the attribute grows again by 2

even the command only (entmod) the attributes without making any change.(to restore it use battman sync)Is there a workaround to this bug?

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Block Colour Change

May 1, 2006

Looking for starting point to writing a routine that will open blocks in a drawing and change the colour.We receive drawings from clients with their blocks and would like to have them changed to our company colours.

So basically, i am looking for something that would within a drawing, change every block to a specific color without exploding and redefining. The colour changes will be the same throughout new drawings.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Attribute Text

Jun 24, 2012

I have a block "MANAGER" with Two Attributes "CETOP" and "CEBOT" I would like a lisp to replace what ever is in those attributes with defined text, for my purposes "Text1" and "Text2". I would like a simple routine that even I can understand so I can apply it to a couple of other lisp projects I have.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change All Hatch To Particular Layer

Nov 7, 2013

Lisp that can select all hatch in a drawing with a layer called AELE, even if it is embedded in a block and change it to layer AHAT with Green colour?

The layer AHAT may or may not already exist in the drawing.

We need to run the lisp on a lot of drawings (exported from Revit) so I need to use the script to run this lisp on multiple drawings.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Sum Area Calculation Mm2 Into M2

Jan 6, 2012

i've got a lisp-routine that calulates multiple area's and put the sum in text in the drawing on the place i select.

the sum has to be devided with 1000000 so that it is in m2.
 
the lisp-routie i use is:

(defun c:ca(/ pt ent txthgt)
;;; bepalen van de teksthoogte indien current style height = 0
(setq txthgt (cdr (assoc 40 (tblsearch "STYLE" (getvar "TEXTSTYLE")))))

[Code]......

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Text Style

Dec 16, 2013

I am trying to put together a LISP that changes the font of two text styles. One bing  named "Standard", and the other "WD".

This is what I have so far...

(defun C:CHANGESTYLE (/ entities len count ent ent_data ent_name new_style_name)
(command "STYLE" "Standard" "Romantic" "" "" "" "" "")
(setq entities (ssget "X" '((0 . "TEXT")))
len(sslength entities) count 0);

[Code]....

 I couldn't figure out how to select mtext and text all in one swoop, so i ran it twice 

Now, when i run this code, i get the following error "lselsetp nil".

CADMASTER TECHNOLOGIES, LLC
[URL]....

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Block Layer

Jul 25, 2006

I have been filtering through this descuession group for a whil this morning looking for what I need and have found somethings that are close but haven't managed to change them a little to do what I am wanting..

I have drawings with a block named UG101 and has been inserted on all sort of different layers.

What I would like to do is run a lisp routine that would select all blocks with the name UG101 and put them on the layer CableInfo.

I have many other blocks that i need to do the same to but with different names, so I was hoping, I could change the lisp routine around to do the rest of the blocks in the drawing..

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Attribute Width

Jan 9, 2013

I found this routine [URL]...... that changes the width of an attribute in a block. After use it, I need to use the ATTSYNC to update the other instances of the bloc in my project.

How to modify this lisp that I receive a prompt to choose if the width attribute will be change just in the selected block or in all instances of the block? In that way, I would not have to use the ATTSYNC command each time.

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Change Radius Value In Duct

May 17, 2013

This is a duct lisp which is i found , which code line i have to change and how for radius value ? for example if my .

" Specify first segment width value " is 1500 then i wanna be my inside fillet radius 1500 / 3 ---------------------------------------------------------------------------------------------------------------------------------------- (defun c:duct(/ actDoc Ang1 Ang2 ptLst enDist fPt lEnt lObj lPln oldVars oldWd plEnd plStart1 plStart2 prDir segLst Start stDist stLst tAng vlaPln *error*) (vl-load-com) (defun GetPlineVer(plObj) (mapcar 'cdr (vl-remove-if-not '(lambda(x)(=(car x)10)) (entget plObj))) ); end of GetPLineVer (defun asmi-PlineSegmentDataList(plObj / cLst outLst) (setq cLst (vl-remove-if-not '(lambda(x)(member(car x) '(10 40 41 42))) (entget plObj)) outLst '() ); end setq (while cLst (if(assoc 40 cLst) (progn (setq outLst (append outLst (list (list (cdr(assoc 10 cLst)) (cdr(assoc 40 cLst))
[code]............

View 1 Replies View Related







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