AutoCAD Visual LISP / AutoLISP :: Program For Cross Section By Manual Input
Jun 26, 2013
Is it possible to write a program for cross section by manual input of data like below. Objective is to draw a cross section with grid lines and labels of section data and datum value.
Program will ask for :
Datum value ?
Grid line spacing ?
Datas are :
Section Left
Chainage 5 Section value : 12.5
10 13.5
20 5
23.7 3
and so on.....
Section Right
Chainage 5 Section value : 8
10 13.5
20.5 15
25 3
30 14
and so on.....
View 3 Replies
ADVERTISEMENT
Sep 5, 2012
I just need the userinput to be incorporated in the insert command but don't know how to segregate the block name from the block path..
;;;PROMPT USER FOR BLOCK NAME HERE
(setq userinBLKNAME (getstring "
Please type in the block name shown in the allrevblocks - ex: IFCC4:"))
;;;INSERT BLOCK BASED ON BLOCK NAME PROVIDED HERE
(command "-insert" "B:\CAD\REVBLOCKS\IFC\"USERINBLKNAME PAUSE "1" "" "")
View 3 Replies
View Related
May 7, 2012
I've been trying to append a user input by adding this text "ABC" to the front of it. How can I do that?
(setq NUMX (getstring "
Please specify NUMBER:")); INPUT NUMBER 123 HERE
(SETQ NUMXX (append '(ABC) NUMX))
So that NUMXX now equals ABC123.
View 2 Replies
View Related
Dec 14, 2013
I want to write a very simple AutoLISP program to scale selected objects by a factor of (1/25.4). How to I get the program to pause and allow the user to select the base point? I know that "~" will bring up a selection window, but what is the character that will allow point selection (in this context)? While we're at it, what is the operator that would trigger a pause and allow user command line input?
View 7 Replies
View Related
Jun 18, 2013
In my acaddoc.lsp I have it load an autoload.lsp file that contains many lisp routines (attached). I am getting the "extra right paren on input" error. It appears to error after the third line in the autoload file "san18"....I removed everything after the third line and no error, I put them back and it errors and only loads first three?
I am using Civil 3D 2014 and I have added all neccesary paths to the trusted locations.
View 4 Replies
View Related
Jul 4, 2013
I would like to automate drawing process for certain data. Using some LISP codes User will be asked to provide some data and using that data an automatic drawing needed to be developed at Drawing editor of AutoCAD. For example;
Enter the width of Sheet: 50 mm
enter the length of Sheet: 200 mm
Enter the sheet thickness: 5mm
Enter type of feed: Automatic
Are there holes in Strip: Yes/No
Specify nu of holes: 5
Position of holes Centre: 5,5
Distance between the holes: At an interval of 20mm each
I just need a LISP code for such program.
View 9 Replies
View Related
Jul 30, 2012
Is there a way to have an alert box pop up at a certain point in the code which gives the user a chance to cancel the LISP program and not proceed any further?
View 9 Replies
View Related
Feb 21, 2013
I would like to eliminate a mouse click in my program. I use getstring to allow the user to either enter in an integer or a distance used for labeling in a drawing, but I could eliminate the need for the user to then click an option that completes the label if I only knew how to determine if the entry is an integer (such as 5 or 15) or a distance (such as 24" or 36").
View 9 Replies
View Related
Jan 4, 2013
While opening a dxf file, i find the message:
Syntax error or premature end of file on line 943.Invalid or incomplete DXF input -- drawing discarded.
I have a approx. 10000 dxf files. Is it possible to know which files are invalid without opening them?
View 7 Replies
View Related
Sep 23, 2013
I am trying to locate a .wdp file with minimal user input. this is what I have so far
;All file saved in this folder
(setq filedir "I://PROJECTS//")
;User will put the following in, but there might be a small description after 915-01. That is why I have a wildcard
(setq filename (strcat "915-01*"))
; string together everything
(setq nextlevel (strcat filedir "JOB " filename "*" "//ACAD"))
;; the final path should look something like this:
I://Projects// JOB 915-01(something here... could be anything or nothing)//ACAD//915-01(something else could be here as well).wdp
;set file extension
(setq fileext ".wdp")
; search files
(setq wdp_file (vl-directory-files nextlevel (strcat filename "*" fileext)))
I am confused on where and when I can use wildcards for searching directories.
View 1 Replies
View Related
Sep 16, 2013
I have a list function that asks for the user to pick points when it is run. It looks something like this (foo arg1 arg2) When invoked it asks the user to pick points and press enter when done It.
Instead of getting the points from the user i want to pass it a list of pre-defined points. The code cannot be changed so I must use it as is.Is this possible, if so how can it be done?
View 9 Replies
View Related
Jun 13, 2013
I have a lisp program which will create a cover sheet for my electrical drawings by extracting data from the title block. Once this is done, I manually print the cover sheet.
What I would like is to create the cover sheet, have the lisp program pause, print the cover sheet, then when printing is done, quit the drawing file so the cover sheet does not remain.
I tried several approaches, but the lisp program finishes before the cover sheet prints.
View 1 Replies
View Related
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
Oct 21, 2013
I have an AutoLISP program that hangs up for no apparent reason. I can run the program with an Alert in the loop. The program is a sheet generator, creating a border (insert with attributes), dimensions and MultiLeaders in Model Space, then a new Layout Tab is generated and the new elements are CHSPACEd into the new layout. An Alert temporarily halts the program once the task of a new Layout is created. In this form, the program works as designed. However, if I comment out the Alert, the program hangs up as if in an infinite loop. Also, hitting Escape does not cancel the AutoLISP, I must use Task Manager to end AutoCAD instead. My computer was recently upgraded to Win7 64-bit. I'm running 64-bit versions of software. (AutoCAD MAP 2011).
View 4 Replies
View Related
Oct 13, 2011
Have an AutoLisp program that inserts a block with attributes. Been using it forever. Yesterday I ran the program and somehow when the block is inserted, it skips the Y scaling factor. The program should insert a block at a point with a X scale of 19.2, Y scale of 19.2, Rotation at 0 and then four attribute values.
What is happening is the block is inserted at the correct point and X scaling factor, but the Y scaling factor goes in for the Rotation angle (19.2 degrees), the Rotation angle goes in as the first attribute and the remaining attributes are shifted over and the last attribute is missing.Line of code is:
(command "INSERT" "CNVTAG" inspt scl scl 0 text1 text2 text3 text4)
The command prompt displays:
Command: (command "INSERT" "CNVTAG" inspt scl scl 0 text1 text2 text3 text4)
INSERT Enter block name or [?] <NEWWHDBORD>: CNVTAG
Units: Inches Conversion: 1.0000
Specify insertion point or [Basepoint/Scale/Rotate]: Specify scale factor <1>:
19.20000000000000
Specify rotation angle <0>: 19.20000000000000
Enter attribute values
Conveyor number: 0 Conveyor Speed: 5315-BCS Motor Horsepower: 1.5hp Release
Mode: 45/90fpm
I looked at the system variables INSUNITS, INSUNITSDEFTARGET and INSUNITSDEFSOURCE AND THEY ARE ALL SET AT 0..Currently using AutoCAD 2010.
View 3 Replies
View Related
Mar 19, 2013
have a simple lisp (no v.b.) program that changes the color of m-leader lines in acad 2010?
IV 2010 Suite
Digital Storm PC:
EVGA & Intel components
Win 7 Pro 64 bit
View 9 Replies
View Related
Oct 17, 2011
Is it possible to get the output from the MEASUREGEOM command back into an VL program?If I use:(setq angle (command "MEASUREGEOM" "a" line1 line2 "x"),
the value of the angle is displayed on the screen but is not passed back into the program and the variable "angle" is not set.Is there a way that I can set this variable?
View 1 Replies
View Related
Dec 28, 2013
I would like to write some sort of AutoLISP program to evenly space objects across a given distance. I have attached a .pdf file showing what exactly I mean.
I would like the program to enable me to either enter or measure (via the selection of two points) the "z" distance, to enter or measure the "y" distance, and to enter the number of objects, "n". I would then like the program to evenly space "n" objects across the "z" distance.
A program like this is, I have to be honest and say, way beyond my current capabilities.
Perhaps some initial guidance to get me going?
View 6 Replies
View Related
Oct 4, 2012
i am writing something that will draw consecutive lines with a rubberband to be used as a leader from a block's insertion point. this:
(WHILE
(SETQ LN (GETPOINT "
Select Next Point (ENTER to Finish) : "))
(COMMAND "LINE" (GETVAR "LASTPOINT") LN "")
)
works, but does not include the rubber band. i tried:
(WHILE
(SETQ LP (GETVAR "LASTPOINT"))
(SETQ LN (GETPOINT LP "
Select Next Point (ENTER to Finish) : "))
(COMMAND "LINE" LP LN "")
)
which includes the rubberband, but will not exit the loop. The last break source in VLIDE shows that
(GETPOINT LP "
Select Next Point (ENTER to Finish) : ") is casuing an error. Placing
(SETQ LP (GETVAR "LASTPOINT"))
outside the loop causes all lines to be drawn from the same point rather than the endpoint of the previous line.
View 9 Replies
View Related
Feb 7, 2012
I'm trying to create a macro for a toolbar button to open a third party program. Basically we want to open a custom .exe application from a button on the ACAD toolbar.
View 5 Replies
View Related
Jul 30, 2013
Is this something that is possible? Basically I have an excel file with sample data that comes coded (red background for fail, Green for pass) Then we transfer that into halos on a DWG. got a routine to count the halos in a DWG. Now I was thinking it would be nice if it compared the number to the excel file to make sure no mistakes were made when placing the halos.
So as I mentioned I've seen rountines to read data in cells but none to count cells based on colour.
View 8 Replies
View Related
Oct 20, 2012
I want to use the "Profile Sample" program supplied with C3D to create an alignment and profile. I am creating the stations and elevations in LISP and want to send them to the "Profile" program. I have seen in a C# program the use of an Array to send the data. I would like to do the same. eg.
LISP - (profile_sample sta1 elev1 sta2 elev2 sta3 elev3 ...etc)
VB - What is the code to pass this data to the Profile Sample program?
I am VERY new to VB programming. I have trouble giving up LISP.
View 4 Replies
View Related
Apr 6, 2011
I am trying to annotate a floor plan to show the location/orientation of section, elevation and detail drawings. The labels must also indicate the appropriate drawing cross reference. (basically a circle with a arrow, text inside circle showing drawing cross reference). My question is - is there an automated way/library to insert such labels or do I have to create each of them from individual elements and make a block?
View 1 Replies
View Related
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
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
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
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
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
Dec 9, 2013
I am trying to verify the bending strength of a solid part. Need to calculate the section modulus on certain cross section. Don't know how to do it using inventor.
View 7 Replies
View Related
Jul 17, 2013
Is it possible to add additional cross sections (sample lines added after views were created) to an existing Section View Group?
C3D 2012 SP3 & C3D 2014 SP1
Win 7 Professional 64 Bit
View 9 Replies
View Related
May 13, 2013
I am using AutoCAD 2013
My solid model is imported from IGES file format. I'd like to make a plane at specified location (perpendicular from the surface), and I'd like to have a cross sectional geometry cut by that plane. (attached pic.)
1. How can I make a plane following perpendicular line from the surface?
2. How can I export the cross sectional geometry?
View 5 Replies
View Related