AutoCAD Visual LISP / AutoLISP :: Turnoff ModelLayout Tabs In 2014 From Code?

May 20, 2013

hiding the modellayout from code.My code is updating the registery properly.but it is not reflecting/hiding the model/layout tabs in application. hide/trunoff from code.Model/layout is not required for my application.Is there any command to  hide model/layout tab.

void CMyApp::TurnoffModelViewLayoutTAB()
{
//TurnOff Model View Tab   

[Code]....

View 2 Replies


ADVERTISEMENT

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 :: Zoom Extents For All Tabs

Mar 10, 2009

I'm currently working in a drawing that has 148 layout tabs and I frequently work in drawings with more tabs than that. when I switch tabs, I like to see everything in the tab. Is there a lisp that will do a zoom extents in every tab so I don't have to manually do it all the time?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Get List Of Layout Tabs Without Vla Or Layoutlist Functions?

Mar 6, 2013

okay, I need a way to get a list of layout tabs without vl-, vla-, vlax, or LAYOUTLIST functions. Why?  You ask?

This is for lisp funct that will run in AcCoreConsose. Apparently the console doesn't yet support these.

Also, need a way to check Effective name of dynamic blocks without vl-, vla- or vlax- funs also.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: DXF Code For Inverted Xclip?

Apr 3, 2013

I know to get the spacial filter on an xref to get the clip verticies, but not how to tell if its an invert xclip.

Even the arx guys seem to have difficulty with this. How to do it with lisp, com, or arx code?

[URL] ......

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Code To Convert All Lines

Sep 18, 2013

I need a lisp code to convert all Lines, Polylines, Arcs and Splines to Polylines with 0.4 width.

I prepare this:
(defun c:CH2pl ( / SS);changes all lines, plines, arcs and splines to POLYLINE with 0.4 width(if (setq SS (ssget "_X" '((0 . "LINE"))))(command "_.pedit" "m" SS "" "Y" "w" 0.4 ""))(if (setq SS (ssget "_X" '((0 . "*POLYLINE"))))(command "_.pedit" "m" SS "" "w" 0.4 ""))(if (setq SS (ssget "_X" '((0 . "ARC"))))(command "_.pedit" "m" SS "" "Y" "w" 0.4 ""))(if (setq SS (ssget "_X" '((0 . "SPLINE"))))(command "_.pedit" "m" SS "" "Y" 10 "w" 0.4 "")))

 But I want pure lisp code in a professional way!

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Modify Hatch Code

Aug 20, 2013

Modify the attached lisp I found in this forum to work using a different hatch pattern, scale and angle.  The new hatch should be in default Autocad "LINE" pattern and angle set to 90 degrees (vertical). If possible, I would like the angle and scale to be editable.  Find attached Multi_Hatch-45 code posted by CADaStroumph in 2008.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Renaming Xref Using Code

Jun 18, 2013

This lsp was passed on to me from a colleague but he doesn't know where he got it. It does a useful procedure of placing each xref, residing in the drawing, to a unique layer. The layer name is derived from the xref name. I would like to edit this to take only part of the xref name. This system I work with requires all files to have the job number as a prefix eg LE1399901_Contours.dwg, so the xref name would be LE1299901_Contours by default. I want to remove the first 10 characters to be left with "X_Xref-Contours" layer name using this code.

(defun dxf (i a) (cdr (assoc i a)))
(defun c:lxr ( / ss cnt xrs en ed bn xp xbn )
(setq ss (ssget "x" '((0 . "INSERT"))))
(setq cnt 0)
[code]........   

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Code To Link To SCR File

Feb 19, 2012

LISP code to link to a scr.file.I would like to run ACADDOC.lsp with abobe code everytime I open a drawing.But I want to link the KISP file to script file of mine like C:

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Routine For Multiple Paper Space Layout Tabs

Nov 25, 2013

Any LISP routine that can create multiple paper space layout tabs and can name them incrementally. I have a template and I wanted to copy tab2 of my layout multiple times and name them incrementally. I have a code shown below that comes close to what I need it to do but it creates a "New Layout" instead of copying the tab I need it to. Please see code below:

(vl-load-com)(defun c:LAYOUT+ (/ *error* prefix i n acDoc oLayouts layoutName) (defun *error* (msg) (if acDoc (vla-endundomark acDoc) ) (cond ((not msg)) ; Normal exit ((member msg '("Function cancelled" "quit / exit abort"))) ; <esc> or (quit) ((princ (strcat "
** Error: " msg " ** "))) ; Fatal error, display it ) (princ) ) (if (and (setq prefix (getstring "
Enter layout name prefix: "))

[Code] ......

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Attribute Multiple Paper Space Tabs

Apr 12, 2012

Is there a way to change a specific attribute in a block found over x-amount of papers pace tabs?

At current I can only change one tab at a time.

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Return A List Of Strings Of Layout Tabs In Drawing

Mar 6, 2013

(layoutlist) ... returns a list of strings of the layout tabs in the drawing.I've used this ages... Isn't it a core lisp function, or is it coming from express tools or somewhere else?

View 5 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 :: Code To Draw Grid Lines

Jan 1, 2014

I have this code to draw grid lines within a rectangle:
 
;Variable settings(defun var_set () (setq *var_lst* '("cmdecho" "osmode" "expert" "plinewid" "dynmode") *var_usr* (mapcar 'getvar *var_lst*)) (mapcar 'setvar *var_lst* '(0 0 2 0 0)) (vl-load-com))(defun var_reset ()(mapcar 'setvar *var_lst* *var_usr*)) (defun *error* (msg) (if (not (member msg '("console break" "Function cancelled" "quit / exit abort" "" nil)) ) (princ (strcat "
Error: " msg)) ) (and ;(vl-bt) (var_reset) ) (princ) ) (defun string-list (data) ;by lee-mac @theswamp (if (vl-string-search "@" [code].........

The above gets me the grid lines; but I have a block inserted at both ends of the grid line; how do I get the selection of those entities (selection set "frame") after each array?

or I would need to map a point list and draw each grid individually how do I go about that?

Attached is the sample of the output I'd like to achieve using LISP.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Code Removes Prefixes Bind

Dec 4, 2012

The code removes prefixes bind ($ 0 $), renaming layers, blocks, dimension styles, but some objects do not change the name as linetypes, text styles and duplicate names.If I have an existing name, I want to change the name with a (2) at the end.Example.

Layer: FloorLevel$0$Door90
If the layer "Door90" is existing, is renamed to "Door90 (2)"
(defun c:delprefixe(/ ActDoc Name NewName)(vl-load-com)(defun RemoveBindPrefix (String / Pos LastPos)(if (setq Pos (vl-string-search "$" String))(progn(setq LastPos Pos)(while (setq Pos (vl-string-search "$" String (1+ Pos)))(setq LastPos Pos))(substr String (+ 2 LastPos)))String));
[code]....

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Where Is Developer Documentation In Map 2014

May 18, 2013

I've just downloaded autocad map 2014, but I can't find the developer documentation. I can find some crap in the general help referencing lisp and vba, but no clearly organized developer documentation. In the previous versions there used to be an acad_ dev xxx.chm  file, that was perfect for the job, but I can't find anything similar here. Do I really need to install an earlier version and copy the file from there?

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Code Sum Lines Length / Multiplied By Constant

Aug 6, 2013

I have lisp code, which count total length, but I need that it count and multiply by constant which I choose manual (such as in example, total lines yellow length * y + total blue lines * x = ... , example 50*2 + 60 * 3=280), 

remember the another code, such as I have d200 with total l=1000 and d250 with total l=1500, i need to count total cost such as 1000*y+1500*x

one think, diameters numbers is not only 1 or 2, it can be many different diameters.

dwg file here:

[URL]..........

lisp file here:

[URL]........

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Edit Code To Import Setup Of Choice

May 16, 2012

I have the following code in a toolbar button that when I click on a setup within this tool it imports that setup into my current dwg. How to edit this code so that it will continue to import the setup of choice into the new drawing..but in addition....set the new one current & delete all previous setups that were in the drawing?

^C^Cfiledia;0;^Rpsetupin;"K:/_BARONE TEMPLATE FILE-2012/BARONE_PAGE_SETUPS.dwt";filedia;1

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Checking For Existence Of Drive Using Code Not Working?

May 2, 2013

I'm trying to check for the existence of a drive using lisp, then if not found perform a task (represented in my below example by the alert)

(if (vl-file-directory-p "C: en") T)(alert "exists"))

 I know it doesn't work because if I change the T to nil as demonstrated bellow I should invoke the opposite reaction from autocad but instead I get the exact same outcome which is an alert telling me the file exists?
 
(if (vl-file-directory-p "C: en") nil)(alert "exists"))

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Error / Bad Argument Type - Code Still Working

Jul 23, 2013

My code returns the error, but it still works.

    (vl-load-com)
    (setvar "cmdecho" 0)
    (vlax-for ucs (vla-get-UserCoordinateSystems (vla-get-Activedocument (vlax-get-acad-object)))
    (setq UCSList (cons (vla-get-Name ucs) UCSList)))
    (setq FileName (vl-Filename-Base (getvar "Dwgname")))
    (setq NewUCSList (vl-remove-if '(lambda (x) (vl-string-search FileName x)) UCSList))
    (setq Listlength (length NewUCSList))

[code]....

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Routine No Longer Working In 2014?

Sep 4, 2013

One of our users has recently upgraded from AutoCAD 2005 to AutoCAD 2014. He has a LISP routine that will no longer work and I'm not sure why.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: 2014 - Insert Block With Attributes

May 21, 2013

I am testing de new version of autocad 2014 and i have a problem with lisp.

when i use (command "_insert" "block1" pt1 "" "" "" obj1 ).

The block is inserted but without value. In the old version work.Some variable that has to change?

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: 2014 And Keyboard Context Menu Key

May 17, 2013

Switching from 2010 win xp to 2014 win 7. I need my specific user interface  , and cant replicate it because of this issue  :

I used to press context menu key on keybard to make edit menus pop up . In 2014 even though its same settings  (show context menus and time sentive click)  i ve lost this ability .

Either menus dont appear at all or they are replaced by the small command line context menu. I think this suggest new command line features are messing with right click options any variable i can turn off , or else to go back to normal.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Running Code As Macro (custom Command In Ribbon)

Dec 23, 2011

So I can run the following code from the command line with no problem:

  (WRK-Insert_Standards_Block '("S:\AUTOCAD\_Common\Linetypes\CSW_Civil-Linetype"))
  (WRK-Insert_Standards_Block '("S:\AUTOCAD\_Common\Linetypes\CSW_Survey-Linetype"))
  (WRK-Layer_Insert_all "CSW-X-FM_Layers_List")

However when I put it into a macro (custom command to be used from the ribbon) it spits out the following in my command line:

(WRK-Insert_Standards_Block '("S:

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: User Select In Button Marco Not Working In 2014?

Jul 29, 2013

I have various Button macros with the user input select in them, but in 2014 they dont seem to be working anymore.

they worked in 2013.

It just says invalid selection.

example

^C^CSelect;change;p;lt;phantom;;

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Insert Another Drawing Layout Tabs Contents In Current Drawing

Mar 7, 2013

I want to insert another drawing layout tabs contents in current drawing.

It's easy for MODEL tab, but for LAYOUT tabs, I dont know how!?

I prepared a code for INSERTING MODEL tab in current drawing:
 
(defun INS_DWG (TAB path dwg P / blk)(setq blk (strcat ""*" path dwg """));(setq N (vla-get-count (vla-get-layouts)));;Number of LAYOUT TABS in dwg(if (or(= TAB 0) (= TAB nil))(command "INSERT" blk P 1 0)); TAB=0 or omitted ==>Insert MODEL;(if (= TAB 1));==>Insert the 1st LAYOUT in dwg file;(if (= TAB 2));==>Insert the 2nd LAYOUT in dwg file;and so on....);;;usage:;;(INS_DWG 0 "c:\test\" "test.dwg" '(0 0))

View 8 Replies View Related

AutoCAD VB :: Convert Lisp To Visual Basic Code?

Oct 1, 2013

can more easy convert lisp to visual basic code?

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