AutoCAD Visual LISP / AutoLISP :: Dimstyle Break Size Variable?

Aug 28, 2009

I want to set the break size in all of my dimstyles but I can't find a system variable for it. know what it is or how else to set it?

View 2 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: How To Set Dim Break Size

Mar 16, 2007

How to set the dimbreak size for their dimstyles (I'm sure it can be tweaked a bit... but works ok as is):

(defun SetDimBreak (DimstyleName Value / ds edata xdata newxdata i ent)
(if
(and
(tblsearch "dimstyle" DimstyleName)
(setq ds
(vlax-vla-object->ename
(vla-item (vla-get-dimstyles
(vla-get-activedocument (vlax-get-acad-object))

[Code]....

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Set Dimension Break Size

May 17, 2013

I there any way to set the dimension break size in autolisp ?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Break To Break At Point Command

Mar 19, 2010

Is it possible to change te Break command permanently in the Break at Point command?I never use break, only break at point.

Changing te macro for break ^C^C_break to the macro for break at point ^C^C_break \_f @ doesn't work.

To do it manualy at the command prompt takes to much keyboard entries and mouse clicking.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Check String To Set Up A Dimstyle

Nov 18, 2011

I've been working on a lisp to set up basic settings such as text styles, dim styles, discipline specific layers and things of that nature.

I have a prompt to ask for a discipline designator as a string.  I want to have an If statement or a conditional to read that string and check for a "C" if it finds it I want to have it set up a dimstyle to decimal feet ect and if not do it as architectural units.

This is just a test lisp that I'd like to add to the main one listed above...  

(defun c:test(/ disc dsnm dsna)

(setq disc (getstring "
Discipline (G,C,S,M,E,CP): "))                ;Prompt for Discipline
(setq ds (getint "
Dimscale Factor: "))                                          ;Prompt for Dimscale
[code].......

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Detect Dimstyle Change In Reactor?

May 17, 2012

I need ot append events when the dimstyle is change using the AutoCAD dimstyle popup list, but don't know which reactoer to use. I tried with Comman begin and end, and Sysvawill change and changed, but they don't detect the dimstyle changes.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Modify Dim Text Color In Current Dimstyle

Jun 27, 2012

How to change the dim text color in current dimstyle with a lisp routine? I want to modify current dimstyle instead of override current dimstyle, so it can change all existing dim text color under the current dimstyle.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Asterisks In Variable Name?

Nov 15, 2013

I was just looking through one of Lee Mac's tutorials and I'm curious about something.

Here's a link to the tutorial I'm talking about.

[URL]

What is the purpose of the asterisks in the following code (marked in RED):

(if (not *ans*) (setq *ans* "Alpha"))
(initget "Alpha Beta Gamma")
(setq *ans*
  (cond
    (
      (getkword
        (strcat "

[code]....

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Set TARGET Variable

Apr 23, 2013

I am trying to change the current TARGET variable to 0,0,0. If the variable is not changed is causes problems with plotting. I have the VBA that will change the TARGET variable. VBA works no problems. I am wanting to replicate in LISP because I do not want to have to convert to .NET and do not want to make sure the user has the VBA loded on thier system.  Here is what have so far.

;;;Get active viewport
(setq avp (vla-get-ActiveViewport (vla-get-ActiveDocument (vlax-get-acad-object))))
;;;Get current TARGET variable
(setq CTarget(vla-get-Target avp))

Here is the problem. Is changing or putting the vaiable.I have tried

(vla-put-Target avp (vlax-3D-point '(0.0 0.0 0.0)))

and

(vla-put-Target avp (vlax-make-variant (vlax-3D-point '(0.0 0.0 0.0))(vlax-variant-type  CTarget)))

They either error out or nil with no change. I have even tried to locate it in the Dictionaries.

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Make Selection Set After Break Command

Nov 19, 2011

The following function

(command "_break" ent1 p1 p2)

break a polyline into two separate polylines. How can I get a selection set with two separate polylines?

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Repeating Break At Single Point

Nov 7, 2011

I'm creating the following macro:- (defun C:BK () (command "_BREAK" PAUSE "_F" PAUSE "@" )(princ)) to add to a shortcut key lisp file and then I want it to repeat... How do I make it repeat?

I want it to do the same as this:- *^C^C_break \_f @ but as a shortcut key in a lisp format.

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Break Lines Horizontally And Vertically

May 14, 2013

a routine that has the option to break vertical or break horizontal, depending on the option, the lines that cross either the horizontal or vertical (again, depending on the option) a specified distance (say .05) on either side of the line you wanted to keep.  So if I choose BREAKH, the vertical lines that I choose would break any horizontal lines that cross them.  Same applies to BREAKV.  Hopefully I communicated clearly enough. 

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Get Net Volume Results Into Variable

Nov 11, 2011

There is a command in autocad that will get a Bounded Volume from a closed polyline and a volume surface (command "AeccReportSurfBoundedVolume").  It reports the results to the screen. How to get the "Net Volume" results in to a variable using Lisp? 

Maybe a lisp routine that gets information from the text screen.  That would not be ideal but I could work with that.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Subtracting List From A Variable

Sep 17, 2013

I've created a list and want to subtract all the values within it from another variable, and assign it to a new variable. How do I do it?

Basically, I ask for ground level (assigned to variable G1), and then any number of depths beneath that (assign to list LVLLIST), and I want to return the value of the bottom point. So it's all the values in LVLLIST added together and subtracted from G1. And assign it to a new variable BASE.

For example,

G1 = 650.00
LVLLIST = (1.23 23.26 0.13 50.23)
(setq BASE (- G1 LVLLLIST))

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 :: Program Variable Names?

Feb 28, 2012

Is there anyway to program variable names?

What I was thinking of was in a loop some times I need multiple sets of similar variables but am not sure how many sets I am going to need. I would like to be able to increment the variable names each time the loop runs.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Command Line Variable

Feb 7, 2013

Somehow, I manage to turn of one variable that display errors on command line.

For example:

(seq a 6)

suppose to return, on command line, something like:

error no function definition: SEQ

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Multileader Scale Variable

Oct 10, 2008

A2008. Is there a setvar, setenv, registry entry etc. that can be used to change the scale of Multileaders with annotative off to have the same effect that DIMSCALE has on Q leaders? I want to have a single scale-independent Multileader style and modify it on the fly along with DIMSCALE and LTSCALE. I'd use Qleader but UCS's do odd things to text position and orientation.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Passing String As Variable?

Jul 9, 2013

I would like to use a string as a variable if this is possible. I've got:

new-pl-lay (as a variable that holds layer name "UGL_PL_NEW")

first-cable (as a string that holds "new-pl-lay")

I'd like set the current layer to "UGL_PL_NEW" by using the first-cable string.

Something like:

(command "_.layer" "m" (read first-cable) "")

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Convert Variable To Command Name?

Mar 12, 2012

I am trying to shorten my code by using the variable as the command name. Is that possible to do?

;; instead of this(cond ((eq USER_INPUT_ANSWER "blk-cdtree-01-06")(C:blk-cdtree-01-06)) ((eq USER_INPUT_ANSWER "blk-cdtree-01-08")(C:blk-cdtree-01-08)) ((eq USER_INPUT_ANSWER "blk-cdtree-01-10")(C:blk-cdtree-01-10)) ((eq USER_INPUT_ANSWER "blk-cdtree-01-12")(C:blk-cdtree-01-12)));; do something like this(C:blk-cdtree-(substr USER_INPUT_ANSWER 11))

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Save Filename As Variable

Oct 20, 2011

how to write a lisp command, or function, that will save my newly created drawing with a file name is that is called up from a variable.

For example:

(setq filename variable)
(command "saveas" "r14" "filename")

and i would want the outcome to be:  variable.dwg, rather than filename.dwg. I have tried numerous different ways of doing this with command prompt and cant seem to get anything to stick.  Everything that works just creates a file named "filename.dwg", which is not what i want to do.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Check If System Variable Is Read Only

Nov 22, 2012

How do I check, with LISP, if a System Variable is read only? In particular ANNOTATIVEDWG. This one is read/write when there are no annotative objects in a drawing, but read-only if there are.

View 7 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 :: Update Block Attribute With Variable

Mar 8, 2013

I would like to create a lisp that does the following:

Update a titleblock attribute with a $variable.

The titleblockname is variable / not static.

The attribute is not variable / Static, DW_SCALE

The titleblock is always places on the same layer, BL$4----

The (custom)-plotscale is stored in the $var "gvpsc".

I've tried to ajust the following lisp code. But I couldn't extract the part I need.

The problem is, the code checks all the layouts and updates all the titlblocks one by one.

Truely a good code. 

The only problem is, I don't have multiple layouts and I have a variable titleblock name.

Here is to code i've tried to convert to something I could use.

(defun C:UPD-DPC () (setvar "cmdecho" 0) (setq blkname "DPC-STEMPEL");(getstring "
Enter the name of block to update: ")) (setq att1 "DW_DATE");(strcase(getstring "
Enter the name of the attribute to change: "))) (setq newatt (strcase(getstring "

[Code] ....

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Replace Drive By Environment Variable?

Apr 26, 2012

I want to know if it's possible to replace a drive by an environment variable in a search path in the profile. For example:

to replace C:Program FilesAutodeskAutoCAD Mechanical 2012Acadm by %LOCAL DRIVE%Program FilesAutodeskAutoCAD Mechanical 2012Acadm. 

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Storing Variable / Associate / Recall

Oct 24, 2013

I am looking for some way to store variables. For example in loop I want to

Enter a number
1

Enter hatch pattern
Ansi31

Enter a number
3

Enter hatch pattern
Ansi32

Enter a number
1

Enter hatch pattern <Ansi31>
Enter
Enter a number.... etc.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Pass Command Line Variable

Mar 21, 2012

I have this small lisp routine:

(defun c:1p nil
(command "_.-plot" "yes" "" "controls 11x17" "Ledger (11 x 17)" "inches" "LANDSCAPE" "NO" "view" "01" "FIT" "CENTER" "YES" "newpap2.ctb" "YES" "As" "NO" "NO" "yes" )
(princ)
)

I want to use it to plot different views which I will append to the command when it is called from within AutoCAD.This code will, of course, print view one.Currently my worst case is 25 views and, for that situation, I have simply repeated this code 25 times with a different function name an view number for each view. Eventually I would like to make a dialog box that would allow me to select with checkboxes (toggles) the views to print and with a button to print all.

For example, if I wanted to plot view 25, after I had loaded this lisp routine I would enter, on the command line in AutoCAD, the function name ("pp" perhaps?) followed by some variable (in this case 25, but could be any view name. ie. 01, elev, detail) and the view name would be inserted at the appropriate place.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Removing A Character From A Variable / String

Oct 24, 2011

I am using  a variable that is being called up from a .csv file for a file name.  By default this variable automatically includes a comma due to it being called from a .csv.

How to remove a character ( , ) from a variable? I'm not sure if this is along the right line or not, but i used the READ function to read the variable as a string (i think thats how it works?).

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Compare Value Of Variable To Set String Of Text

Jun 11, 2012

I would like to know how I can compare the value of a variable to a set string of text if the two prove to be equal perform task A if the two prove different perform task B?

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Replacing Substr(s) In String Variable

Feb 18, 2013

I write a code to replace strings in one string.for example

str="AutoDesk, AutoCAD, 2013, Electrical, 64Bit"
patt=", "
NewStr=" - "
==> result: "AutoDesk - AutoCAD - 2013 - Electrical - 64Bit"
;;replaces NewStr instead of Patt(s) in Str string(defun ReplaceStr (NewStr Patt Str)(While (> (vl-string-search ptt str) 0)(setq Str (vl-string-subst NewStr patt Str)) );;whilestr) ; usage;(ReplaceStr " - " ", " "AutoDesk, AutoCAD, 2013, Electrical, 64Bit")
==> result= ; error: bad argument type: (or stringp symbolp): nil

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Adding Variable To Existing File

Oct 4, 2012

I have attached 2 lisp files. datblkx5 makes a block of selection, inserts the block with a 5x distortion, explodes it, and corrects the text for width factor and text height. This one works fine.

I wanted to add the feature of scaling my selection with a user input value. This is the lisp datblkxxx. This one doesn't work. (that is it doesn't correct the text for width factor). I can't figure it out.

View 3 Replies View Related







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