AutoCAD 2010 :: Fractions To Decimals Convert With Prompt Lisp?
Apr 23, 2013
I need
(distof "..")
and
(rtos ..)
as a prompt (VB window or command line).
::Basically I need to push button (my custom command with function like: ^C^C_f2d; - fraction to decimal) and invoke the routine to enter fraction or decimal to bring either
15.125" - will be 1'-3 1/8"
or
1'-3-1/8" - will be 15.125"
same as:
Command: (rtos 15.125)
"1'-3 1/8""
and
Command: (distof "1'-3 1/8")
15.125
but instead of typing (...) I want pop-up texbox for input, or just simple input: 3/5" in command line to get 0.6 .
I was wondering if there is a way to convert many regular fractions to stacked fractions without editing each one. I have a file full of fractions that all need to be stacked. It seems it would be quicker if I could select all the fractions and stack them at once rather then edit each one individually.
I wrote the code below (allow the user to pick points in different viewports and then override an existing dimension's text with the difference in X values. The (hopefully) last issue is that the fractions should be vertically stacked and at 100% text size.
(defun c2text () (command "mspace") (setq p1 (getpoint "Select left point "))
On our older 2007 version, we used the command %%140 (and so on) to make the stacked fraction 9/16 in our string of text. Now with version 2010, all of the fractions (where this command was used) display as a question mark. This is a major issue since now all of our isometric drawings are displaying this in regards to text.
Any good way to convert decimal values to fractions for use in inch measurements? I have a script that works great but it returns values like 5.5638 and I'd rather it return the closest fraction answer like 5 9/16. 1/16ths would be great, but I'd settle for 1/8ths.
I started trying to come up with a large if with lots of > and < conditions, but it might be better not to reinvent the wheel.
When using RomanS, how do you stack fractions in single line text? AutoCad will do it automatically in multiline text but I am having trouble in single line text.
How do I set it so that when I type fractions in a text box it automatically keeps them as non-stacked fractions rather than horizontally or diagonally stacked?
I’m trying to put together a loop for if nil or something other than text or mtext is accidentally selected than prompt text was not selected. This is what I have so far.
I am able in lisp to create a command prompt selection menu, easy (see code below).However what I want is for the lisp to be ready to undertake an action UNLESS I select an option.
An example is the offset command wich has a function ready to roll (namely the specify offset distance) "OR" I can interrupt the "specify offset distance" and enter one of the sub options (in the case of offset Through/ Erase/Layer).
My code attempts to offset also, UNLESS the user wishes to specify a distance.
(DEFUN C:loadoffset ();CREATING MENU FOR SUB COMMANDS [GETIT] [GOTIT]...(setq choose (getstring " Select an option... [1=GET DIST] [2=GOTDIST]: "))(if (or (equal choose "1"))(GETIT))(if (or (equal choose "2"))(GOTIT));TERMINATING SELECTION MENU...)(defun getit ( gotit )(setq MYDIST (getdist " SELECT A DISTANCE: "))(gotit))(defun gotit ()(command "_offset" MYDIST pause pause"exit"))
When you use shell command and type cmd, command prompt appears and the default location is My Documents. How can i change it to another directory by using only lisp?
I have a parent directory with x-amount of folders contained inside. I say X-amount because I would like to keep adding or deleting folders as time progresses. I want the folders contained within this parent directory do be read into a lisp variable and then be printed to the command prompt till every folder is displayed by name, then the loop may stop.
has something changed in 2011 controlling prompts to save pdfs when publishing from sheetset manager?? im using page overrides, which uses dwg to pdf.pc3 file. it publishes but no prompt for file name. i have checked the sheetset publish options and it is set to multiple & prompt for file name, however it still doesnt prompt and saves it in the folder nominated. where else is this controlled?
What or where is the setting to change the dimension value input to automatic rather than accepting the default every time I put a dimension in? I don't want to be prompted for input.
Current text style: "Standard" Text height: 0.0833 Annotative: No Current text style: "Standard" Text height: 0.0833 Annotative: No Current text style: "Standard" Text height: 0.0833 Annotative: No Current text style: "Standard" Text height: 0.0833 Annotative: No
After closing and reopening my command prompt, I find that it is now at the bottom left of the screen and no longer part of the main graphics window. How can I get it to display at the bottom of the main display?
How can I change the way the Project Browser maps the creation of new projects?
Currently, the new project folder is created and named according to the Project Name prompt. We want the folder to be named according to the Project Number prompt...
I'm using AutoCAD Mechanical 2010 and received a .DXF file that contains 'solid' objects. Unfortunately the next tool in my workflow doesn't understand 'solids' only polylines (and a few other basic shapes like circles, lines, etc). Is there some way to convert the object in AutoCAD?
I tried the 'boundary' command but when it asks to 'Pick Points' and I click inside the solid, it always gives the error 'Valid hatch boundary not found'.
hey there i have an issue i cant resolve i am working on this project and i want to remove the decimal digits as shown in this picture "L=50.000" i want it to be L=50.0 also S=0.000 i need it to be S=0.00
how to shorten these numbers? by the way this is a pipe label
- I have drawing partslists with parameters that change automaticly - Based on a main assembly with a customized structured BOM, with information I fetch from the individual parts exported parameters (Ex. =Length <part-length>) - The main assembly is based on many sub-assemblys - Based on "Make Component" skeletonmodels - Based on embedded EXCEL worksheets in where I control my parameter values.
Now the problem expl.:
- Total I have about maybe 50 parts, witch have 15 parameters each, that I need to control this way. - In every single part I have derived it's parameters from the skeleton part, and exported them. - On some parameters I don't want to show the units, in most of the parameters I don't want the trial zeros.
So in the individual parts parameter table I choose "Custom Property Format" for the exported parametern in every individual part.
-uncheck "Trailing Zeros" and check "Apply to existing...", then uncheck "Unit String" for some parameters.
I lot of setup work with 50 parts, 15 parameters each (750 individual parameters).Every time I change a dimension in the embedded EXCEL worksheet, ex. a pipe dimension and thickness, a diameter for a revolved feature and so on, the units go back to it's default values again and I have to do all this parameter setup "Custom Property Format" again.
Tried the new geolocation today, and found the position markers to be quite useful.
However... Using WGS 84, they only show the latitude/longtitude with 4 decimals. And 0.0001 degree is about 11 meters in real life, so... I was hoping there was a setting to give me at least 5 decimals here.
My work needs to convert thousands of DGN files to DWG. We are using AutoCAD 2012. Is it possible to batch convert dgn files with a LISP and a mapping file?
Is there a lisp routine or macro out there that will convert crappy text to a set block? i.e someone had used simplex 15' text for street names, we now have a street name block using romans 12' text. want to be able to click on text and convert to block while converting the text street name to the street name entry. there's only one entry for the street name block.
I have a list that is "acl", I would like to convert it to a string "acl", everything that I have read uses alot of code. Does this really take that much code to do?