Illustrator Scripting :: Convert Decimal Values To Fractions For Use In Inch Measurements?

May 21, 2013

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.

View 13 Replies


ADVERTISEMENT

Illustrator Scripting :: Convert RGB Value To CMYK Values

Mar 26, 2013

I want a script that can convert RGB value to CMYK values.
 
I've seen this thread which explains a script to round up and down:
 
[URL].....
 
but is there a script that i can actually define lets say the colour is yellow and in RGB it looks ok because its in RGB mode so you change it to CMYK and you have 6% - 9% cyan and you only want yellow
 
is there a script out there that i can say
 
if
 
cyan = 6%
yellow = 80%
magenta = 0%
black = 0%
 
then change to
 
cyan = 0%
yellow = 80&
mangenta = 0%
black = 0%
 
I don't mind writting the code for each colour that needs to be converted as it would only need defining once but how would i make this script?

View 8 Replies View Related

AutoCAD Inventor :: Covert Decimal To Fractions In ILogic?

Aug 8, 2012

I found out that if you have a dimension that is keyed you cannot use the custom property format in the fx. so how do I get ilogic to convert to fractions rounded to a 32nd.

When I put this (see below) in my code it changes my custom iproperty to a yes-no
 
fractionString = RoundToFraction(Dim_F, 1/32, RoundingMethod.Round)
 
Here is my code that drives my table in a drawing but the dimensions come as decimal and I need fractions.
 
If Hole_F_Type = "NONE" TheniProperties.Value("Custom", "F")= "-"ElseIf Hole_F_Type = "2-Hole" TheniProperties.Value("Custom", "F")= Parameter("Dim_F")ElseIf Hole_F_Type = "S1" TheniProperties.Value("Custom", "F")= "S1"& "-" & Parameter("Dim_F")ElseIf Hole_F_Type = "S2" TheniProperties.Value("Custom", "F")= "S2"& "-" & Parameter("Dim_F")ElseIf Hole_F_Type = "S3" TheniProperties.Value("Custom", "F")= "S3"& "-" & Parameter("Dim_F")End If

View 1 Replies View Related

CorelDRAW Graphics Suite X5 :: Centering And Measurements Past 6 Decimal Places?

Apr 8, 2012

I was trying to use the guides to make a triangle and everything was fine until I used a third guide on one of the triangles points (2 guides; 1 at 90 degrees and 1 at 60 degrees). When I used the dimension tool on it to measure from the bottom of the page to that point, the measurement did not match the numbers in the 90 degree guide's info. It was like .0000007 or .00000007 inches off. I know that's not much but I really needed precision for my particular drawing and I dont know how to get more accurate measurements with the program rounding to the nearest  6th decimal place (the highest setting on drawing precision). If it says it's centered in the intersection, then why do I see a tiny micro right triangle when I zoom in?

View 2 Replies View Related

Illustrator Scripting :: Round Font Size If In Decimal With AppleScript?

Dec 4, 2013

Is it possible to automate the rounding of font sizes if they are in decimal form? I have a few thousand files I have to prepare for upload and they can't have font sizes such as 8.214 which several do. With AppleScript would it be possible to identify and then round up or down such font sizes?

View 2 Replies View Related

Illustrator Scripting :: Change Values In Action

Sep 13, 2012

I frequently record Illustrator Actions. My actions are quite long, but they all involve three common steps:
 
-Assigning Notes to shapes   
-Assigning Swatches to shapes   
-Selecting shapes that have a specific notes 

I often need to re-record my actions to repeat all the steps, but to change the notes/swatches that are selected/assigned during the action.
 
Illustrator has a re-record command. This command is great for changing the value of the note in number 3 of my list. However, it does not work for items 1 & 2 in my list. For these items I have to delete the old step in the action and then record a new step with the new swatch/note.
 
I know macros in Microsoft Office have an editor which allow you to change values in actions. Is there anything similar for Illustrator actions?You can save an Illustrator action and open it in Text Edit. However, all the attribute/swatch values are saved as weird strings, so I don't know how to change them.

View 4 Replies View Related

Illustrator :: Small 1 Inch By 1 Inch Logo For Invoices - Resolution Of 600 DPI

Jan 25, 2013

Someone would like a small 1 inch by 1 inch logo for invoices at 600 DPI. However I understand that illustrator doesnt work in DPI or PPI since it's vector. Would I have to transfer the small image over to photoshop. I did try and save a 1 inch by 1 inch logo at 600 PPI, however when I saved the image it was no longer 1 inch by 1 inch. It had increased significantly in size regardless of what file format I saved the image as.

View 10 Replies View Related

Illustrator Scripting :: Find And Replace Script With Values Via Excel

Feb 18, 2013

I am searching for a simple automated Find and Replace script, the idea is that in Excel the Find and Replace with texts are located. The script finds the textblock in Illustrator and replaces it with the value from Excel "New number".
 
Example Illustrator:

Example Excel Find and Replace:

View 1 Replies View Related

Illustrator Scripting :: Assign Values To Artboard And Save Within Document?

Oct 14, 2013

Is there any chance to assign values to an artboard?
 
I've experimented with “tags”, but they only work for pageItems. (if the item which includes the stored data is deleted, the data is also deleted)
 
It is simple data like v1=true, v2=false, … I want to assign. And it needs to be saved within the illustrator document.

View 4 Replies View Related

Illustrator Scripting :: Load Default / Preset Values From External File?

Mar 1, 2012

I have several Illustrator JavaScripts that I've written with the ESTK. A lot of these scripts involve resizing the artboard or artwork to specific sizes. Instead of forcing the user to manually input the dimensions they want into text fields, I just stored a half-dozen or so "presets" in an array.

Then they can select one of the presets from a dropdownlist, or go ahead and input a custom size. These presets are the same for multiple "resize" scripts, so it would be nice to store those presets in a separate file (i.e. presets.jsx) that my resize scripts could reference, so when I need to add or change a preset, I could just go to that one shared file, and all the scripts would be updated.
 
Is it possible to do that? If it is, a quick example of how to load the variables from another file.

View 1 Replies View Related

Illustrator :: Convert Pantone To CMY Values Without K?

Jul 6, 2012

With my printer, I need to be able to print colors in CMY, not CMYK. Is there any way to convert Pantone to CMY values without the K?

View 5 Replies View Related

AutoCad :: Display Area Of Closed Polyline As Feet Inch Rather Than Feet As A Decimal

Sep 20, 2011

Is there a way to make AutoCAD2012 display the area of a closed Polyline as Feet- Inch(ex 22'-4") rather than the feet as a decimal (ex feet=22.3333333) as it does when the units are set to Architectural or Engineering?

View 1 Replies View Related

Illustrator :: One Inch Square Box Does Not Draw One Inch

Oct 7, 2013

If I try to draw a square box in any size, illustator does not make it square.
 
For example, if I select the Rectangle Tool, click in the art space and set the rectangle to one inch by one inch, I get a box that is 1.0003 by 1.0003
 
Here is a screen shot of what I am getting.
 
This is also happening to any rectangle and circle.
 
Even if I hold down shift to keep the preportions lock, it still happens.
 
I have check and nothing is snapping or set to snap.
 
This is a major issue for me as I use illustator for creating dielines and those dielines need to be very accurate.

View 8 Replies View Related

Illustrator SDK :: Convert Pixel Values To Vector Shapes

Feb 6, 2014

I am interested in setting up a plugin that is able to read the greyscale values of a defined number of pixels throughout an image, average them, and then generate shapes based on the value output.

View 3 Replies View Related

Photoshop :: Image Size Dialogue Box Keeps Adding Decimal Values To Whole Numbers CC / CS6

Nov 9, 2013

I am creating an image of 150mm x 100mm at 300dpi but photoshop keeps adding decimal points like 150.02 when i change the image from the original size, is it something I am doing wrong or a known bug?  You would expect that when you change an image to 150 x 100mm it would stay at that size and not be added to.

View 2 Replies View Related

AutoCAD Inventor :: Round Decimal Dimension Values To Nearest 1/16"?

Jun 14, 2006

Way to round decimal dimension values to the nearest 1/16"? For instance, 43.0599 would display as 43.0625 (On a drawing). Tried playing with tolerances, but thought it would be better addressed as customization.

View 2 Replies View Related

Illustrator Scripting :: How To Convert EPS File To SVG

Sep 11, 2012

I added CS6 COM reference in my VB.NET application and after that I have the following basic object creation in order to convert a eps file to svg. But for some reason when I create this COM object it is launching the Adobe Illustrator application. Why it is doing like this? It’s a simple COM object why it is interacting with Illustrator Editor?

View 9 Replies View Related

Illustrator Scripting :: Convert EPS File To JPG Or PDF

Jan 15, 2009

I'm using Adobe to deal with .eps files.

My problem is to display graphic arts in "read only mode". That means when I'm done developing graphics in my .eps file, I want to display this graphics to other user without giving him option to edit it or delete it.

I'm trying to accomplish this true Visual Studio 2005, C# .net

View 6 Replies View Related

AutoCAD Civil 3D :: Convert Measurements From Field Into X / Y / Z Coordinates

Jun 9, 2012

I am new in civil 3d 2012 software and i have a major problem. i am a survey engineer and i have a topcon 3005 LN total station for using in field. i want to convert measurements from field into xyz coordinates via methods of civil 3d. i find that civil 3d uses fbk format (i don't know what is it), but my total station uses TOP format (ascii)

i ll give you two examples

EXAMPLE OF FBK FORMAT

UNIT FOOT DMS
HORIZ ANGLE RIGHT
PRISM CONSTANT 0
PRISM OFFSET 0
EDM OFFSET 0
CR OFF
ATMOS OFF
COLLIMATION OFF
JOB LINEWORK SAMPLE
SCALE FACTOR 1.000000
VERT ANGLE ZENITH
NE 1 5000.000 5000.000 263.650 "STA1"
NE 6 5088.000 6104.000 249.635 "STA6"
AZ 6 6000 135.000000
AZ 1 1000 315.000000
STN 1 0.000000 "STA1"
PRISM 0.000000
FC1 VA 1000 0.000000 00.000 90.000000 "AZMK"
FC1 VA 2 117.563300 300.023 90.421692 "STA2"
FC1 VA 101 29.082602 91.481  89.454093 "SDWK1 B"

EXAMPLE OF TOP FORMAT

S S1                  1.443   
D S2                            1.564  328.7150   93.7675     4.412
D 3                             1.564  225.6570   92.1310     9.926
D 4                             1.564  241.7630   93.1510     9.680
D 5                             1.564  256.0790   91.9080     4.420
D 6                             1.564  344.5500   89.1070     1.714
D 7                             1.564  189.6990   90.3460     1.703
D 8                             1.564  203.8600   88.6180     2.567

Need converting TOP format to fbk format?

View 5 Replies View Related

AutoCAD 2013 :: Convert Many Regular Fractions To Stacked Without Editing Each One?

Oct 22, 2013

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. 

View 2 Replies View Related

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 .

View 3 Replies View Related

Illustrator Scripting :: Convert All Guides To Paths?

Apr 12, 2012

I need access to AI guides in AfterEffects shift+alt+ctrl double click doesn't always work.

Is there a script to convert all guides to paths?

View 2 Replies View Related

Illustrator Scripting :: Convert JavaScript To AppleScript?

Apr 3, 2012

I need to convert javascript to Apple script.
 
try {
app.activeDocument.layers.getByName( '.ARD' ).remove(); } catch (e) {};

View 1 Replies View Related

Illustrator Scripting :: How To Convert File To JPEG

Oct 22, 2012

I am using following code to convert AI file to JPEG
 
exportFileToJPEG('~/Desktop/Harsh/1.jpg');
 
function exportFileToJPEG (dest) {
if ( app.documents.length > 0 ) {
var exportOptions = new ExportOptionsJPEG();
var type = ExportType.JPEG;
var fileSpec = new File(dest);

[Code]...
 
but ir crope the document to the size of the image and resize the ArtBoard to the size of Image.
 
I want to convert the Existing ArtBoard Area only , i dont want to crope the image.

View 1 Replies View Related

Illustrator Scripting :: How To Convert EPS To Word Document

Nov 28, 2013

I have around 300+ files in eps format but i need them to convert it to word format.
 
Any options availble.
 
I have tried the eps to pdf and convert the pdf to word, but this doesnt worked for me.

View 1 Replies View Related

Illustrator Scripting :: How To Convert AI Document Into HTML / CSS

May 10, 2013

I am writting in extended javascript to convert .ai document into HTML/CSS.  for Placed image item i want to wirte css data. but the url of image path i am getting from the  placedItem is  : '~/Desktop/AdobeIllustrator/home.jpg'  when the same path i am  using in my css like :
 
.imageParameter
{
background-image: url('~/Desktop/AdobeIllustrator/home.jpg');
}

but the browser is not able to locate the image.

View 2 Replies View Related

Illustrator Scripting :: Convert CSV To Swatch Library?

Aug 4, 2012

I have a list of 300+ colors that I need to make into a swatch library for Illustrator. The data looks like this:
 
GREEN GRASS,127,187,0
PALE YELLOW,241,235,135
LIGHT YELLOW,238,231,93
DAFFODIL,249,231,21
MOONBEAM,249,223,22
etc.
 
It's RGB I think. In any case, I am just starting with Illustrator and I know NOTHING about scripting. these colors into a swatch library? I am getting a migraine just thinking about putting them in one by one.

I found something here, but that didn't work for me. I get an error on processing on line 75. [URL] ....
 
Error 24: app.doScript is not a function, Line 75 _> app.dpScript(speakThis, 1095978087); //AppleScript.
 
I get as far as choosing the csv file, and then I get the error. I think this outputs as CMYK, but not sure.

View 23 Replies View Related

Illustrator Scripting :: Convert To Grayscale For Selected Item

Feb 4, 2014

It is possible to apply the Convert to Grayscale(Edit->Edit Colors->Convert to Grayscale) for the selected items in illustrator cs3 in script (javascript)?

View 12 Replies View Related

Illustrator Scripting :: Convert AI File Into JPEG Using Script (JSX)

Jul 12, 2012

I want to convert a AI file into a JPEG by using JSX(java script). I am able to change its file type but having some problem with resizing.

View 3 Replies View Related

Illustrator Scripting :: How To Open Without Convert To Artboart Dialog

Jun 1, 2012

I'm batch exporting JPGs of AI files in CS5, but many of the files are as old as AI10, so I'm getting the "Convert to Artboard" dialog box. I've set open options (below), but they seem to just pre-populate the checkboxes in the dialog. Any way to do this without user interaction? userInteractionLevel doesn't seem to apply here) 
 
var optRef = new OpenOptions();
optRef.updateLegacyText = true;
optRef.convertCropAreaToArboard = false;
optRef.preserveLegacyArtboard = true;
optRef.createArtboardWithArtworkBoundingBox = false;

View 2 Replies View Related

Illustrator Scripting :: Convert Layers In Document To Artboards?

Sep 24, 2013

Script which would convert the layers in a document to artboards? At present I have a lot of documents with a couple of hundred layers on each of them, but I've decided to change the way that I organise my workflow and started using artboards instead. I don't really have the time to spend moving them individually from a layer over on to an artboard as there are a lot.

View 1 Replies View Related







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