Illustrator Scripting :: Passing Variable Via BridgeTalk

Jan 9, 2013

I now understand about serializing the message, and loading and running external scripts via opening, reading, and sending them within the context of BridgeTalk. 

I have a palette window which contains a listbox of items that searches and lists the contents of over 400 products. This pic of the template below is typical for all items.  The imprint area shown will change depending on the product.
 
Script #1:
When the user selects a product from the list, that selection is used to open a file (illustrator template) for that item that shows a guide path box  with height and width information for the imprint area on the product.  The currently opened illustrator document contains the artwork they are working on at the time.  This artwork is copied and pasted to the newly opened template file.
 
Script #2:
This script contains  an array of all the products in the palette list.  Within each index of that array, each item will contain the following information:
 
Example (the name property of each item will match the name of the index box selection from script #1):
 
var itemArray = new Array();
//p may be saved at index 0 of itemArray
var p = new Object();
        p.name ="P- Shape P";
        p.width = 189;
        p.height = 103.5;
        p.pos = [300,564];
 
I need to send the selection from script #1 to script #2 so I can loop through the array and find a match, at which point the information stored in the properties of the item will be used to scale the art and place it in the correct position on the template.  Is there any way to send a variable from script #1 containing the name of the selection via BridgeTalk and have it stored in a variable in script #2?  If not, I read somewhere where it might be possible to write/save it to disk and have the second script read it. 

View 8 Replies


ADVERTISEMENT

Illustrator Scripting :: Reading A File Containing BridgeTalk

Feb 6, 2013

I have a scriptUI generated palette which contains 26 icons linked to their respective scripts.  When an icon is pressed, it invokes the required script via this:
 
searchPanel.children[0].onClick = function(){
searchOne.open("r");     
var bt = new BridgeTalk;

[Code].....
 
My other scripts have "normal" functions that don't cause any problems, so I'm assuming it has something with BridgeTalk being loaded inside the palette function (since the code that's read in from the file is inserted at the location from where it's called). 

View 8 Replies View Related

Illustrator Scripting :: How To Automate Importing Variable And Datasets Into Graphs Via Scripting

Dec 18, 2012

I'm try to automate the importing of the Varaible and datasets into my graphs via Scripting, but the ImportVaraibles() function doesn't seem to work.  Here is my Script, mostly copied from the example script provided with Illustrator (CS5).  And, this works manually, using the file names in the script, via Load Variable Library
 
    Set appRef = CreateObject(strIllistratorVersion)
   
       'Open the file and import the datasets
        Set docRef = appRef.Open(strTemplate & "200-500.ai")
        'docRef.Datasets.RemoveAll
        docRef.Variables("Yearbook").Delete
 
Here is the problem, after I delete the previous library, then this next line, right from the example, does nothing
The script then exits with 'No Datasets in this document'
       
docRef.ImportVariables (strXMLFolder & "Lumber_200-500.xml")
'appRef.DoJavaScript "alert('Template:" & strTemplate & strRange & ".ai  |  XML file:" & strXMLFolder & ""  & objFile.Name & "^')"
        If (appRef.Documents.Count > 0) Then
            Set docRef = appRef.Documents(1)

 [Code]....
 
If I remove that delete line, the script runs, but just uses whatever Variables I had last loaded, not the XML file.
 
It's simply not loading.  What do I need to do to get it to load?

View 8 Replies View Related

AutoCad :: Passing Field Or Variable To Plugin

Oct 18, 2011

I recently added the QR Code plugin from the labs to ACAD 2012.

[URL]

It's pretty cool, and I have added it to one of my title blocks so that contractors can access more resources via their phones if they have questions on site. The code can be updated with a simple command QRED.

The downside of this, of course, is that I have to edit my block for every project. The documentation says that the encoded info is stored as XData. Is there a way to access this data via a field, or pass a variable/attribute through to the plugin to male this a bit easier?

View 0 Replies View Related

Illustrator Scripting :: Adding A Number To A Variable

Feb 3, 2014

I am trying to add a number to a variable.  var n=y+36...So I am creating a new variable (n) whose vaule is 36 points more than the variable "y".

View 5 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

Illustrator Scripting :: Variable Width Tool (JavaScript)

Feb 6, 2013

I am looking for any info on scripting the Variable width tool (Javascript).
 
Background: By adding a gradient to a variable width strock you can create nice 3D looking  Shapes (see example)

this is a straight vertical line with varied widths, then hit with a gradient.
 
Goal: My hope is to write a script that will take a "Profile" or "Shape" and convert it to a Variable width line. (see Example)

The Black line is to have its widths modified
The Red line is how wide the line needs to be.

View 10 Replies View Related

Illustrator Scripting :: Read A Number From A Variable And Rotate A Shape

Jul 26, 2012

I'm using the variables panel in Illustrator to pull a data set I've got.
 
For example there's 2 text variables and 1 number going from 0-359. I'm looking for a script which looks at the variable name and pulls the number, then uses that number to rotate a shape by that many degrees.

View 2 Replies View Related

Illustrator Scripting :: Access Graph Data Through Scripting DOM?

May 6, 2012

Can you access graph data through the scripting DOM?

View 3 Replies View Related

Illustrator Scripting :: Create Mirror Text And Stroke Text In AI Scripting

Mar 16, 2013

the Script of creating mirror text and stroke text in Adobe illustrator scripting.

View 4 Replies View Related

Illustrator :: Can AI Action Name A Variable

Jan 20, 2014

I'm making an action for folks at work to use (I'm not well versed enough in scripting to script what I want to do, but an action is passable), and part of this action adds a variable into the open document. The thing is, the variable has to be named a certain thing and it keeps defaulting to Variable1.
 
Currently I have it set up to create the variable, then open the Variable window and then have a Stop with a note on what to do, but if there's a way to just re-name the variable in the action itself that'd be best (I need this to be as... well, for lack of a better term/phrase, idiot-proof as possible).
 
Without using a script, is it possible to have an AI action delete an existing variable? I.E. if there's a variable named 'test' by default, can I have an action delete the 'test' variable? I tried recording this but it didn't work and I wasn't able to get consistent results.

View 1 Replies View Related

GIMP :: Unbound Variable Error With No Variable?

Nov 5, 2013

I'm attempting to write a batch script to add some layers to a pre-existing image and save a copy. I've gone through the tutorial, and have run the demo code from Basic_Batch with no errors, but my (what I think of as simple) script throws an "Error: eval: unbound variable: ?" It also seems to cascade the error to other scripts, as I then get "unmatched parentheses: 2" errors from what I assume to be the script immediately following my own during Script-Fu load. This occurs whether running from batch or clicking "Refresh Scripts" from the Script-Fu menu.

What I could find on this forum and Google suggests that I may be required to 'define' one or more of my variables before using it, but for the life of me, I can't figure out which one that would be, and the error (reporting that '?' is undefined!?) I've quintuply (probably more ~_^) checked my parenthesis matching, but they look fine to me.

In case this was an encoding issue, I've tried saving my .scm file as both UTF-8 and ANSI. I should also note that I'm running Windows 7 x64 in English-US.

Script:

(define (script-fu-build-imagebasefilemytext)(let*((image (car (gimp-file-load RUN-NONINTERACTIVE basefile basefile)))(drawable (car (gimp-image-get-active-layer image)))(title (car (gimp-text-layer-new image mytext "Courier" 18 UNIT-POINT))))(gimp-image-add-layer image title -1)(gimp-image-clean-all image)(gimp-file-save RUN-NONINTERACTIVE image drawable "K:\\Images\\Temp.gif" "Temp.gif")));

Since I intend for this script to only be run from batch, I haven't bothered including the typical register stuff.

View 6 Replies View Related

Illustrator :: Disabled Variable Width Profile

Nov 29, 2012

I have a pre-existing graphic uses a stroke with variable with profile (I think) or a special brush to make it look like it's hand drawn.  I'd like to apply the same effect to a few new illustrations to keep the style consistent.  For whatever reason when I ungroup the graphic and select one of the paths, the stroke weight and variable width profile remain disabled (see pasted toolbar graphic below).  The brush still says "Basic" despite the fact that visually it is certainly not the basic brush.

Selected Path

Toolbar (I realize that it says Group instead of Path, but even if I ungroup again and select the path the same options are disabled).

View 3 Replies View Related

Illustrator :: How To Import Localized Variable Library

Dec 21, 2012

I am setting up illustrations for localization and am running into a problem with loading a modified variable library; for instance, one that has been translated. I getting the message "The incoming variable library is invalid".
 
I can't seem to find any information on what to do after:

-linking and adding variables and objects in the Variables panel
-taking a snapshot
-saving the variables library file
-copying and translating the variables library file

View 1 Replies View Related

Illustrator :: Blend Variable Width Strokes?

Sep 7, 2013

I use Illustrator CS5 and can not blend variable width strokes in Illustrator. I can not do that even with the same width profiles unless they are expanded. I could not find any questions similar on the net regarding this, but wanted to double check before I just made the necessary changes. I'm a bit confused because Adobe 'help' shows how powerful the blends of objects are, but we can't do them as strokes?
 
I want to keep the blend as strokes not expand them. What is the best way to view how the blend will look with variable widths without expanding and then 'undoing' a bunch of times.
 
but is there a hot key for expanding the blend without going into object-blend-expand?

View 4 Replies View Related

Illustrator :: Variable Width Profile Options?

Sep 14, 2012

Is there a way to change/customize the variable width profile options for the drop-down options next to the Brush definition options?

View 1 Replies View Related

Illustrator :: Artboard Names As Variable Text?

Oct 15, 2013

In InDesign I am able to assign a variable showing that page.
Example = Page numbers in a book.
 
Is there a way to do this in Illustrator?
Example = Panels for a structure. Labeling the panel with the artboard name.
 
For now I am doing this manually. I would LOVE to speed the process up.
 
DETAILS: The artboard names will exist on the artboard itself when printed (very tiny, in an area hidden by metal posts, for ease of assembly at a construction site). I also need the artboard name to show up outside the artboard in a slug area (much larger for easy viewing in the file).
 
I'd like to just Change the name of a duplicated artboard, and have those pieces of text change themselves, rather then me typing it in two places for every artboard... I can have almost 100 artboards in one file on the structures I work with.

View 18 Replies View Related

Illustrator :: How To Delete Variable Width Points

Mar 1, 2013

I've read a couple of methods for deleting variable-width tool points on a path (NOT path points or paths.)
 
None of them work for me; is there some trick to doing it?
 
I have read: A) Hover over the unwanted point (with var. width tool) and hit Delete and B)Select unwanted point with var width tool and hit delete.
 
Both moves result in the entire path being deleted.

View 4 Replies View Related

Illustrator :: How To Create Diagonal Variable Line Pattern In CS6

Sep 18, 2013

I'm on the brink of insanity with creating my diagonal line pattern. I've tried everything I can think of but the pattern is an absolute mess! I want to create a diagonal line pattern but I want the lines not to be uniform. Basically I've made a group of 3 lines and then one separate line on its own, then to repeat this as the picture below. I've used the distribute function so the distances between the lines is identical everywhere. I've then rotated the whole thing exactly 45 degrees and aligned the lines to fit the bounding box in the "make pattern" mode as shown. Yet the resulting pattern is just a mess of overlap ugliness. All I want is for the pattern to literally look as it does in the image on the left, how to sucessfully do this in CS6?

View 6 Replies View Related

Illustrator :: Insert File Save Date As Variable?

Jun 12, 2013

The CS5 online help is pretty tight-lipped about variables … is there an easy way of pulling in the save date as a variable? ID can do it; even Word can do it :-}

View 4 Replies View Related

Illustrator :: JavaScript Save As PDF - Defining Enumerated Values As Variable

May 17, 2013

how I can use a variable as the target for a Save as PDF option in Illustrator javascript. the variables work fine where there is no enumerated value for the property i.e. opts.generateThumbnails but I can figure out how to get it working opts.compatibility or other properties with enumerated values using a variable as the definition.

The code snippet example below will always give an 'Enumerated Value expected' error when run for the opts.colorCompression option even though the string is correct. If I define the opts as opts.colCompression = compressionQuality.AUTOMATICJPEGHIGH then everythings works

how I can define the compressionQuality.AUTOMATICJPEGHIGH as a variable the will work

Code snippet

opts = new PDFSaveOptions();
opts.compatibility = PDFCompatibility.ACROBAT5;
opts.generateThumbnails = thumbnailValue;

[Code]....

View 5 Replies View Related

Illustrator :: Variable Width Tool - Changes Opposite Side Of Image

Nov 14, 2012

Ive been messing around with the variable width tool,  Im not sure I i changed something, I did try to restore defaults but when I make a change it changes the opposite side of the image. For example In screen shot I changed the width on the left and the effect showed up on the right.
 
I would like the width to change where I change it.

View 5 Replies View Related

Illustrator :: Brush Keep Resetting To Calligraphic When Trying To Use Variable Width Profile?

Oct 7, 2012

I'm working on a reflective drawing and using gradients on strokes.  I've been using pressure sensitive calligraphic brushes I made.  Now I'm trying to use variable width preset profile brushes.  It works fine for the first stroke, but every time I make a new stroke, it reverts back to a calligraphic pressure brush.  How can I keep my brushes the same profile until I manually select it to be different? I've gone back and forth between the brush tool and pencil tool and neither will keep any basic variable width profile past the first stroke. I have to select every brush stroke and change it again and again after drawing it.

View 3 Replies View Related

Illustrator :: Variable Width Profile For Brush Tool Keeps Resetting?

Jan 12, 2013

I’m using Adobe Illustrator CS6 with a mouse rather than a pressure graphics tablet.
 
When I create a stroke using the Paint brush tool I would like the stroke to contain a variable width profile. For example narrower at the beginning and end of the stroke but thicker in the middle. Now I can do this by selecting the line after I have made the stroke and choosing the Basic Brush Definition from the drop down list.  But if i try to draw a new line the settings are reset again.  I cannot create a variable stroke while creating the stroke. The brush definition keeps resetting to 5 pt Round and stroke width 1 pt. It would be much quicker if the stroke remained as a varying width profile as I created the strokes.
 
I noticed the same problem with the blob brush tool except it's even worse. With the blob brush tool the stroke weight always resets regardless of whether or not I try to set a Variable width profile.

I tried deselecting "New Art has Basic Appearance" mentioned on another forum but that didn't work.

[URL]

Notice the variable width profile is maintained as the artists draws. It doesn’t keep resetting.

View 13 Replies View Related

Illustrator :: Adjust Starting Point Anchor Of A Variable Width Profile?

Mar 19, 2013

I want it to be a variable stroke, so I loaded up “Width Profile 2” in the profiles. The trouble I am having, is that Illustrator defaults to start the larger dots in the bottom right hand corner, and I would like the “starting point” to be in the middle of the line if you know what I mean. I'm still happy for the dots to start big, then gradually decrease in size, but I want to control where the “beginning” is.

View 2 Replies View Related

Illustrator :: Jagged Curves Created With Variable Stroke Width Tool?

Jul 24, 2013

In Illustrator CS6 and CC, when the stroke width tool is used on a curve, the curve is actually made up of a series of straight lines instead of smooth vector curves:

whereas in CS5 it looks perfect.These images may be too small to see the details, but the difference is there. Is there a workaround for this? Or is it recognized as a bug?

View 2 Replies View Related

Illustrator :: Maximum Allowed Size Of Variable Library XML File Loaded From Variables Palette?

Sep 27, 2012

What the maximum size xml file one can use when making data driven graphics in Illustrator?
 
I can successfully batch when I load a single variable library with about 100 datasets at one time but anything much larger than that in the same xml format gives me a “the incoming variable library is invalid” error. Elsewhere on this discussion forum I have seen answers say there is no limit to the size of the XML file. [URL]..... But my experience with Illustrator CS5 says otherwise.
 
1. If there is a maximum size either in file size, number of datasets, or number of variables/values, what the limit is.
2. I still need to create thousands of the final document I am creating - if the limit is close to 100 and I need to create many thousands - scripting or other methods to get this done?

View 8 Replies View Related

AutoCAD .NET :: Passing A Structure To A Sub

May 24, 2013

I have a need to save coordinates points for a couple of objects, so I decided to use a structure object.

Here is my structure for an 8 sided polygon:

Structure OctoPolygon Public Shared pt1 As New Geometry.Point3d Public Shared pt2 As New Geometry.Point3d Public Shared pt3 As New Geometry.Point3d Public Shared pt4 As New Geometry.Point3d Public Shared pt5 As New Geometry.Point3d Public Shared pt6 As New Geometry.Point3d Public Shared pt7 As New Geometry.Point3d Public Shared pt8 As New Geometry.Point3d Public Sub setPoints(ByVal drawingStartPoint As Double, ByVal mcSize As Double, ByVal mcCenter2Cham As Double)

[code]....

It says "Access of shared member, constant member, enum member, or nested type through an instance; qualifying expression wil not be evaluated"

how I can get the sub to see the points defined in the structure?

View 5 Replies View Related

Revit :: How To Enable Passing Through Walls

Oct 23, 2011

using zoom wheel on mouse, how do i enable passing through walls, instead of continuing to zoom further and further in on walls

View 1 Replies View Related

AutoCAD Inventor :: Passing And Using Arrays In ILogic

Jul 14, 2012

I'm working on a small design project and creating a program in Inventor that utilizes a 2D Sketch to calculate the forces in a 2D static Bridge.... Although this is Besides the point.

In order to do what I want, I've found it will be easier to use Arrays. Unfortunately I'm having trouble passing arrays through various functions and setting them to each other.

These errors are constantly popping up 

Rule Compile Errors in Bridge Stress, in Sketch Test Code.ipt

Error on Line 60 : Number of indices is less than the number of dimensions of the indexed array.
Error on Line 63 : Number of indices is less than the number of dimensions of the indexed array.
Error on Line 69 : Number of indices is less than the number of dimensions of the indexed array.
Error on Line 174 : Number of indices is less than the number of dimensions of the indexed array.
Error on Line 308 : Number of indices is less than the number of dimensions of the indexed array.

Attached you'll find the code I'm using.

View 1 Replies View Related

AutoCAD .NET :: Passing Parameter To Batch File?

Nov 20, 2012

I got a problem to pass parameter from VB to batch file. My code is below to run the batch file and to pass parameter.

Private Sub Button4_Click(sender As System.Object, e As System.EventArgs) Handles Button4.Click
Dim input As String
Dim output AsString
input = "C:atchFile est.gds"
output ="C:atchFile est.dxf"
Dim batchFile As String = "C:atchFileLC_gds2dxf.bat"
Process.Start(batchFile, input & ""& output)
EndSub

With this code the output is like below:

If you look at the screen shot you can find out that input and output variable is passing to one variable LC_gdsin. But I want that output file location will be assigned to LC_dxfout. I tried a lot but could not able to do that.

I am using VB2010 premium and windows 7 32 bit pc

View 2 Replies View Related







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