Illustrator Scripting :: Change Color And Line Weight

Jun 6, 2012

I am trying to create a script who could act as an Autocad plot (ie convert each color to black, with a different line weight). 
 
Here is the first script I melted, who create my Black swatch

if ( app.documents.length > 0 ) {
var myDoc = app.activeDocument;
//add Black swatch
var newSwatch = app.activeDocument.swatches.add()
var newColor = new GrayColor();
newColor.gray = 100;
[Code] ......... 
 
And here is the second one, who replace one color by Black (it don't change the text, nor the lineweight yet…
 
if ( app.documents.length > 0 ) {
//test de dialogue
function csDialog() {
var fabGroup = app.activeDocument.swatchGroups.getByName('Fabrics');
var allFabs = fabGroup.getAllSwatches();
var fabNames = Array();

[Code] ........

View 2 Replies


ADVERTISEMENT

Illustrator :: Why Can't Change Line Weight To Less Than 1pt

Jul 29, 2013

Suddenly, I am no longer able to make a line .25pt or .5pt. I can go thicker but not thinner than 1pt. What gives? I'm working in CC.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Color / Line Weight

Sep 21, 2012

I was trying to do one that can change color and line weight using a number provided by user. What i want to do is to ask a number to the user, 5 for example, and then change the color to 5, and the lw to .5. I was starting with this:

(defun c:ccv (/ eco lun ob cc clw)
(setq eco (getvar "cmdecho"))
(setq lun (getvar "lunits"))
(setvar "lunits" 2)
[code]......

but is not working, it has a bug with the clw variable.

View 9 Replies View Related

AutoCAD Architecture :: Modify Line Type / Weight - Change Color?

May 12, 2011

How can I modify the line type/weight? How can I change the color?  Where are my object properties?

I have seen a few threads with variations of these questions.  I had the same ones, until now.  I did some serious messing around and came up with this, I thought it may be useful:

To get the AutoCAD 2012 "Properties" panel in ACA 2012:

Disclaimer:  This procedure involves modifying your software's configuration file(s).  If you choose to follow it, you do so at your own risk.

1.   Open the "Customize User Interface" dialog by a familiar method (I like the keyboard, the command is "CUI").
2.   Switch to the "Transfer" tab.
a. If you can't see it, expand the dialog to 2-columns by clicking the ">" button in the lower right corner. 

3.  Set the left-hand column to "acad.cuix", I'll call this the "source file".
a.  If you can not see the file, click the "Open" button and navigate to your "Application Data" folder.

i.  Win7:  {userProfile}AppDataRoaming
ii. WinXP:  {userProfile}Application Data

b. Navigate further to the Autodesk Support folder:

i. {Application Data}AutodeskACA 2012enuSupport

4.   Set the right-hand column to "Main Customization File", or another customization file you intend to use, the "destination file".
5.   Expand both files' "Ribbon->Panels" nodes.
6.   Locate the "Home - Properties" panel in the source file.
7.   Right-click the panel and select "Copy" from the context menu.
8.   Right-click the destination file's "Panels" node and select "Paste" from the context menu, it will be added to the end of the panel list.

a.  NOTE: You may get a warning that the panel already exists. If you do, click the "Rename" button.  The new panel will most likely show up as "Copy Of Home - Properties" 
b.  Right-Click the new panel and select "Rename".  Set the name to "Home - ACADProperties"

9.   Click the destination file's "Save" button.
10. Switch back to the dialog's "Customize" tab.
11. Using the drop-down, select your destination file as the file to customize.
12. Expand the (a) "Ribbon -> Tabs -> Home-ACA"  and (b) "Ribbon -> Panels" nodes in the "Customizations…" (top-left) section.
13. Select the "Ribbon -> Panels -> Home-ACADProperties" panel, a preview will appear and the "Properties" section will populate.
14. Edit the panel's "Display Text" property, change it to "Properties"  (this is the name that will appear on the panel once it's added to the UI).
15. Right-click the "Home-ACADProperties" panel in the "Customizations…" section and select "Copy" from the context menu.
16. Right-click the "Ribbon -> Tabs -> Home-ACA" node and select "Paste" from the context menu.
17. Click the "Save" button.
18. Click the "OK" button.
19. Observe your UI, the new Properties panel will appear at the right end of the "Home" tab.
20. Drag the panel to the location you would like it.

a.  NOTE: Adding this panel to the tab causes the other panels to resize so the ribbon fits the screen/UI width.  If there are any panels that you aren't using, turn them off to allow more room for the other panels.  (I turned off the "Transparency" panel, the new "Properties" panel includes those commands in the slide-out, making it redundant.)

b.  To turn a panel off, right-click a panel title, select Show Panels, then uncheck any panel you don't want displayed.

Now, my ribbon looks like this:

View 9 Replies View Related

AutoCAD Civil 3D :: Change Line Weight Of Profile Line

Jul 6, 2013

I seem to be having trouble changing the lineweight of my profile line.  I have changed the line weight in the layer properties, in the Profile properties and tried changed the line weight in the pen style.  Everywhere I could think I try to make the line thicker but when I plot, the line is still the same and difficult to distinguish from the grid blocks of the profile view.

View 3 Replies View Related

AutoCAD .NET :: Changing Color / Line Type And Line Weight

Mar 8, 2012

How to change the Color, line type and Line weight for the Line using .Net. 

View 9 Replies View Related

Revit :: Change Line-weight Of Annotation Line?

May 25, 2012

I've seen umpteen explanations of how to change lineweights in Revit.None of them address this simple thing I'm trying to do. 
 
I just want to: 
 
1. Create a few lilnestyles that appear along side the other line styles - for instance:

Thin Line, Medium Line, Thick Line,     <<Really Thick Line, >>     <<Absurdly Thick Line,>> etc, etc..
 
2. Draw a line
 
3. Click on the line
 
4. Select from a drop down list, "Absurdly Thick Line"  and have it instantly inherit the linestyle I created. 
 
The only way I can do this is to create a family, make a new subcategory of Detail Items, create the characteristics I want in the line, export it as a .dwg file, then import it into Revit - and then I see the new line style along side the other line styles, and I can then select any line and make it the new line style.  
 
Certainly, there is an easy to find, simple, straightforward way to add line styles to the existing group - and have those new line styles become immediately accessible from the "Modify Lines" Linestyle Drop down Menu.

View 1 Replies View Related

Illustrator Scripting :: Color Change To Various Types?

Feb 6, 2013

I am trying to change the color of all items on and under a specific layer.I have been successful changing the color of specific types of objects (paths), but I need to accommodate all the types on the layer and sub layers.
 
I can recurse to as many sub layers as I expect, but how do I accommodate the page Items, path Items, group Items, compound Path Items, etc.I was thinking of pushing everything to an array, but I have no experience with arrays...

View 3 Replies View Related

Illustrator Scripting :: Color Change Command In JavaScript

Feb 4, 2013

I managed to write this javascript. It automatically changes the colors from one swatch (byName) to another (byName) in my opened illustrator file. But if this one color doesn't exist as a fill or outline color in a file, I get an error message, because the script can not detect the color. The script stops. I am working on a batch of Illustrator files with 3 colors to change, but some files contain just 1 or 2 of the colors.Is there a command for javascript which says: "Only change the color, if the color appears"?

Here is the script:
 
var docRef = app.activeDocument;
with (docRef) {
var findColor = swatches.getByName('TSB Dark Blue').color;
var replaceColor = swatches.getByName('TSBDB').color;
[code]....

View 2 Replies View Related

Illustrator Scripting :: Change Overprint Of Color With Applescript

May 4, 2012

I want to overprint a PMS colors using Applescript. I though if I changed the property of the selected items fill color from (fill overprint:false) to (fill overprint:true) it would work. This doesn't seem to change a thing.
 
This is the script I am currently using:
 
script ChangeOverprint
tell application "Adobe Illustrator"
local docRef

[Code]....
 
This is the picture of a simple document I created. The elipse has fill overprint:true. The polygon has filr overprint:false. The original value for the property fill overprint was false. I changed it in the script to true. Which the log shows it changed.

View 1 Replies View Related

Illustrator Scripting :: Batch Change Color Swatch Name In EPS Files

Mar 20, 2012

I have a couple thousand AI authored EPS files with a specific swatch name (SpotBlack) that I would like to rename (black) -- is there any method to do this en masse, preferrably outside of Illy using a text editor?

View 7 Replies View Related

Illustrator Scripting :: Change Stroke Color Of Object In A Script?

Nov 26, 2012

I need the finished script to create a rectangle with no fill and a 20% gray stroke to outline each artboard. I dug this up off these boards, which works perfectly except the rectangles created have no fill or stroke. certainly save me a lot of time drawing rectangles on a daily basis.
 
#target illustrator
var docRef = app.activeDocument;
var artboardRef = docRef.artboards;  
for(i=0;i<artboardRef.length;i++){     
var top=artboardRef[i].artboardRect[1] ;     
var left=artboardRef[i].artboardRect[0];     
var width=artboardRef[i].artboardRect[2]-artboardRef[i].artboardRect[0];      
var height=artboardRef[i].artboardRect[1]-artboardRef[i].artboardRect[3];      
var rect = docRef.pathItems.rectangle (top, left, width, height);     
rect.fillColor = rect.strokeColor = new NoColor();    
}

View 3 Replies View Related

Illustrator Scripting :: Change Color Of Text Frames On Active Layer?

Mar 3, 2013

Okay my script to change text frame color changes the color of all text frames hidden or not.

I need it to only change visible text frames.
 
if ( app.documents.length > 0 ) {
newCMYKColor = new CMYKColor();
newCMYKColor.black = 0;
newCMYKColor.cyan = 0;
newCMYKColor.magenta = 0;
newCMYKColor.yellow = 0;
 
[Code]...
 
How to go about making it only change the color of text frames on the active layer? In the final script I will hide all other layers so if it could be done by a visible attribute more easily that would work just as well.

View 4 Replies View Related

Illustrator Scripting :: CS5 - Change Fill Color Of Selected Path Items

Apr 2, 2013

I'm trying to create a script in CS5 mac os10.6.8 that will change the fill color of selected pathItems. I need a simple script that will change a selected pathItem to cmyk values 2,3,15,0. I will then select this script and implement the action in a batch of 600 files.
 
I wish this process could be recorded as an action but when I record the action "add new swatch" I have to manually input the cmyk values, which will take forever for a batch of over 600 files.

View 15 Replies View Related

AutoCAD LT :: Change Line Weight On Xref?

Feb 21, 2013

change line weight on a xref, i have went into each xref and changed line weight but when i view in model space the line weight is still printing bold.

View 3 Replies View Related

Revit :: Change Line Weight Of Cut Walls

Jul 15, 2010

I'd like to build a new wall type that displays with a different line weight than is set in the Cut Line Weight for the Wall objects. 
 
I've been using object overrides to do this, but I'd like to have a wall style the pervasively dispays with a different cut weight than the rest of the walls. So it would have a different weight when cut in section as well.

View 6 Replies View Related

AutoCAD 2013 :: How To Change Line Weight

Oct 22, 2012

In a sketch block how do you change the line weight..i tried through Block Editor but cannot change...lineweight is currently 0.25mm but i want to change to .70mm..

View 2 Replies View Related

Illustrator Scripting :: Change Color Mode To CMYK Or Greyscale For Exported JPEG?

Jun 6, 2013

Is there a way to export a document @ a different resolution than 72DPI? I know I can set the horizontal/vertical scale to save it at a larger dimension at 72DPI, but I need the file to be actual size and 300DPI.
 
This is part of a larger process, and I'd prefer to do the entire process from Illustrator, and not have to open the files in Photoshop to change the size/resolution.
 
Also, is it possible to change the color mode to CMYK or Greyscale for the exported Jpeg?

View 7 Replies View Related

AutoCAD 2013 :: Change Line Weight In A Block?

Oct 21, 2012

I have a block in which the line weight is 0.20mm...how do i change the block lines weight to 0.50mm & 0.75mm.

View 1 Replies View Related

AutoCAD Inventor :: Change Line Weight On IPT To JPG File

Nov 16, 2013

I am trying to change the line weight on an ipt file saving to a jpg format.

I am creating operations manuals and line weight and pixalation is unacceptable.

View 4 Replies View Related

AutoCad 2D :: Change Line Weight At View Port?

May 20, 2013

I created a xref. this xref included some poly line. width is 0.2mm. i need this poly line line weight should be change from different view port. right now this is shown in narrow line width. how can change this line weight at view port?

View 4 Replies View Related

AutoCad 2D :: Change Line Weight Of Lines And Text Separately?

Nov 13, 2012

When drawing in .stb-file (with layer dependent plot style, plotting in monochrome) and when Dimension Text Style is set to Romans (must not be changed), then how to change line weight of Lines and Text separately?

View 3 Replies View Related

Photoshop Elements :: Change Weight Of Drawn Line After Saving?

Feb 9, 2014

I am making a conatct sheet of photos.  I wanted to define the outside edge of the photos, so I used the Rectangular Marquee to draw an outline around the perimeter, and then I went to Edit>Stroke (Outline) Selection.   I chose the weight of the line (I made it 3 pix) and successfully had the outline.  I then saved the file.
 
But now I want to change the weight of the line (down to 1 pix).  But I can't figure out how to delete the 3 pix line. 

View 1 Replies View Related

Illustrator :: CS6 - Scaling Line Weight On Brushes

Feb 5, 2013

I'm using Illustrator CS6, and want to scale an object that has a brush applied to it without scaling the line weights in the brush. I've been able to somewhat do that by Expanding the object with the brush applied, but then of course it no longer has a brush applied to the object. Is it possible to scale an object without changing the stroke weights in the brush?
 
This is what I have now when I scale, the line weight of the brush scales when I scale the line weight of the line the brush is applied to:

What I want is to be able to scale the line weight of the line the brush is applied to, but not the line weight of the brush itself.

View 3 Replies View Related

Illustrator :: Line Weight Changes When Using Align To Pixel Grid

Oct 10, 2013

When I select Align to Pixel Grid in the Transform Panel, I see line weight changes occur. I try to change the line weight in the either the Stroke or Appearance panel and it will not change, no layers locked, how to change the line weight?

View 8 Replies View Related

Illustrator :: Unable To Create Line Weight / Stroke Under 1pt In CS6

Jul 7, 2013

For some reason I cannot create a line weight/stroke under 1pt in Illus CS6.  I will select 0.5pt but the selection keeps defaulting back to 1pt.  I deleted my preferences, but didn't work. How can I fix?

View 1 Replies View Related

Illustrator :: How To Change Stroke Weight

Aug 19, 2010

Is there a keyboard shortcut to change stroke weight? Increase and decrease.
 
If there isn't , then any way to write a script or something else, to make this hotkey.

I found this thread: [URL]....but the link to script is dead.

View 25 Replies View Related

Illustrator :: Can't Change Weight Of Strokes

Oct 4, 2013

I use artioscad wich has a plug-in for illustrator. When I'm working with illustrator i can't change the weight of my strokes, color or fill, in fact i can't do anything, everything is locked. I have tried to unlock the draw but with n o sucessm I have to make the illustrations for the boxes I draw and using *.eps file is not my solution.

View 7 Replies View Related

Illustrator :: No Visible Change In Stroke Weight?

Dec 3, 2012

I am clicking on a line and altering it's stroke weight to numbers as big as 70pt, but the there is no visible change to the line! If I click off the line and back on it, it still says that it is 70pt, but this is not apparent! Have i clicked on something that prevents me from altering the line weights?

View 1 Replies View Related

Illustrator :: Cannot Change Stroke Weight Below 0.0139"

Aug 28, 2013

I am using a Mac running 10.8.4 and Illustrator CS6, on new documents I can not get the stroke or line weight below .0139”. I set the weight manually but it returns to .0139”, the weight will increase just will not go below .0139”. Any document that was drawn in CS2 retains its weight settings and I can even draw new items and have any line weight down to .001”. I can not go that low in a new document. All setting appear to be the same.

View 4 Replies View Related

Illustrator :: Auto Set Stroke Weight / Colors And Fill Color?

Mar 5, 2014

I'd like to make it easier for our 100,000 designers to use AI to make custom products using a laser cutter.
 
Current Practice
Designers open our AI laser cutting design templates, add their designs using the AI settings our online pricing system can read, then upload their designs to our website for instant pricing, making and shipping.
 
The Problem
Designers have to manually setup AI with settings that can be read by our online pricing system. If they get these settings wrong, our system can not read their designs. So they are rejected and can not be priced or made. This happens more often that you'd imagine.
 
The Solution
Designers do not like design rejections. So I'd like to eradicate them by providing our designers with a version of AI that provides the following settings only:
 
* Set document to RGB
* Stroke weight = 0.01mm
* Stroke colors = RGB 0, 0, 255 and 255, 0, 0
* Fill color = RGB 0, 0, 0
 
This will mean designers have a very limited number of AI choices, with nothing to distract them or to get wrong. Which will result in less (or zero?) design rejections. And products made faster than before. Rejoice!
 
Question
How do we program our AI laser cutting design templates so that when they are opened in AI, they auto set AI settings as defined above?

View 14 Replies View Related







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