Illustrator Scripting :: CS4 - Populating A Drop Down With List Of Printers?

Mar 27, 2012

I'm trying to populate a drop down field with the list of available printers. Here's what I have:
 
var printerList = app.printerList;
var w = new Window ("dialog");
w.orientation = 'row';
var dropDown = w.add("statictext", undefined, "Please select the printer");
var dropDown = w.add ("dropdownlist", undefined, printerList);
dropDown.selection = 0;
var buttonGroup = w.add ("group");
buttonGroup.add ("button", undefined, "OK");
w.center();
w.show();

This will populate a drop down with "Printer, Printer, Printer, Printer" for each printer instead of the name of the printer (which is what I want).
 
When I try:
 
var printerList = app.printerList.name;
 
I get a drop down of blank entries.
 
How exactly does the printerList work?

View 8 Replies


ADVERTISEMENT

Illustrator Scripting :: User To Select A Font Family From A Drop Down List

Mar 25, 2013

I'm building a script that will open a dialog box allowing the user to select a font family from a drop down list (not a list of all of the fonts), and then compare that value against the fonts that are in use, highlighting everything that doesn't match. I have not yet built the dialog, but I've got  everything else working as I want except the list of font families.
 
The following code loops through the list of fonts (only 20 for testing purposes), compares the family name to the previous on the list (error trapped for the first loop), and pushes the family name (if it doesn't match the previous) into an array which will be used in the dialog box. With the two alerts at the bottom (for troubleshooting), I expect the alerts to show the same family name. For the first three fonts they do, but after that the array value is "undefined." 
 
var iCount = 20;
//var iCount = textFonts.length;
var nameHolder = "";
var nameArray = new Array();
 
[Code]...
 
Questions:

1) Any speculation on why this behavior is happening (it isn't truetype versus opentype)?
2) Is there a better way to get the list of font families without duplicates??
2) Is an array the best way to populate a dropdown list in a JS dialog box??? [this will be my first dialog with a dropdown, the others have user-typed values]
 
EDIT: Additional Info
When it reaches the ninth font in the list, the above script starts writing undefined, but when tested manually, as below, it works fine. Hmmm.
 
alert (textFonts[9].family);
var nameArray = new Array();
nameArray.push(textFonts[9].family);
alert (nameArray[0]);
 
EDIT: More info
tried replacing nameArray.push(familyName); with nameArray.splice(i,0,familyName); bad behavior remains

View 4 Replies View Related

AutoCAD Civil 3D :: Parcel List Not Populating After Sort?

Apr 2, 2013

I went to sort my parcel list in the prospector by label and doing so made all the parcels vansih from the list. I have turned off show preview. I expand the site to get to parcels. I click on parcel but nothing appears in the prospector. The parcels are in the drawing. I can view each one in preview. The list was there until I tried to sort them.

If I do a refresh they try to come back for a split second then are gone again. A restart does not make a difference

View 2 Replies View Related

AutoCAD Civil 3D :: How To Delete Printers From List

Nov 9, 2012

I am using Civil 3D Map 2009 and its showing many unwanted printers in the list when I try to print a Map. How can I delete printers from list.

View 6 Replies View Related

Illustrator Scripting :: How To Get Saved Selection List In JavaScript

Aug 21, 2012

Recently I met a little problem about save selection. I want to get saved selection list so that I can used in javascript. Some useful information about how to get Saved Selection list in javascript!

View 2 Replies View Related

Illustrator Scripting :: Hide Layers Based On List?

Apr 8, 2011

I have a very complex graphic with many elements and I would like to find a way to hide layers based on a list.  In the documentation that there is a way to tell if a layer is hidden, but didn't see anything about a way to actually to control the hide/unhide property.  Is this possible?

View 15 Replies View Related

Illustrator Scripting :: Simple / Direct Method To Identify Index Of Selected Item In List Box

Jul 16, 2013

I can't seem to figure out a simple/direct method to identify the index of the selected item in a list box.

I feel like I'm missing something, but I can't seem to figure which (if any) property returns an index number if you use it with the .onChange callback for a ListBox.

The following code accomplishes what I need but isn't particularly efficient or elegant and can get muddled if you introduce multiple lists to check.

Any way to duplicate this same behavior with better code
 
var res = "palette {text: 'Example List', properties:{resizeable:true}
pnl: Panel{orientation: 'row',preferredSize: [400,600],
list1: ListBox{preferredSize: [400,550], properties:{multiselect:true,numberOfColumns:2, showHeaders:true,columnTitles: ['List 1', 'Subitem 0']}},
}}"

[Code]...

View 4 Replies View Related

Illustrator :: Change Size Of The Text That Comes Out With Printers Marks?

Nov 29, 2012

Is there a way to change the size of the text that comes out with the printers marks?

View 1 Replies View Related

AutoCAD LT :: Modify Drop Down List

Feb 27, 2012

Working with LT2012 found that the 'Properties' drop down list can be slow to populate - filling up a line at a time.

View 4 Replies View Related

AutoCad :: Block Attribute Drop Down List

Sep 22, 2011

I have created a generic title block for all my drawings and I have some attributes for the block. Is it possible to have a drop down list for an attribute so I do not have to type in the value/text each time? If so, how?

I want to be able click on 'customer 1' or customer 2' ect. and not have to type it in the attribute.

I'm using Autocad 2011.

View 5 Replies View Related

Photoshop :: Larger Font Preview In Drop Down List CS6

Jun 9, 2012

where the setting for the size of type/font preview drop down is located in CS6, it used to be located under pref->type->type preview - but apparently not anymore. I'm probably "blind", they surely did include this option in CS6?
 
(A thing I find annoying in CS6 is how short the font drop down list is, only covers 1/3 of the height of my resolution, even though I have hundreds of fonts activated - requires a lot of scrolling! I really hope this gets larger if it is possible to have larger previews)

View 3 Replies View Related

AutoCAD .NET :: How To Implement Drop-down List (based On IDynamicEnumProperty) In OPM

May 25, 2013

Is there somone who can explain/show a sample of how a custom drop-down list in OPM can be implemented? Based on some articels by Kean Walmsley, I have successfully implemented categorized properties in the OPM using a .NET wrapper and C#. I have a class imlementing the members of the  IDynamic EnumProperty, ICategorizeProperties and IDynamicProperty2 interfaces (based on ObjectARX 2013).

However, I do not really understand how to code custom drop-down list using .NET wrapper and OPM. I am using AutoCAD 2013 and 2014. I have read a lot of posts regarding OPM but there was no useful information in regards to create custom drop-down lists.

View 3 Replies View Related

AutoCAD .NET :: How To Code Drop-down List For Custom Property Using OPM

May 27, 2013

I am mainly developing for AutoCAD 2013/2014 how to implement a custom property as a drop-down list using OPM and .NET/C# wrapper. I have successfully created categorized custom properties already and can read/save them in XRecords via the OPM. I further implemented the members for IDynamicEnumProperty (using an ObjectARX DLL) in .NET/C# which are:

// ENUM-PROPERTY INTERFACE METHODS DEFINITIONenum myEnum{ steel = 0, copper, wood};public void GetNumPropertyValues( int numValues ){ numValues = 3;}public void GetPropValueName( int index, out String valueName ){ valueName = Enum.GetName(typeof(myEnum), index);}public void GetPropValueData( int index, ref Object valueName ){ valueName = index;}

And I have implemented the GetCurrentValueData() and SetCurrentValueData() members in my .NET/C# wrapper as per the IDynamicProperty2 interface as following:

public void GetCurrentValueData( Object pUnk, ref Object varData ) {AcadObject obj = pUnk as AcadObject; if ( obj != null ){using ( Active .Document.LockDocument( DocumentLockMode.ProtectedAutoWrite, null, null, true ) ){using ( var tr = Active.Transaction ){ObjectId ObjId = new ObjectId( (IntPtr) obj.ObjectID ); DBObject DbObj = tr.GetObject( ObjId, OpenMode.ForRead ); if ( DbObj != null ){try {if (
[code]....

This code compiles without error but instead of the expected drop-down list the OPM only shows a field where I can enter or edit integer numbers, but there is no drop-down list when clicking on the field....

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

CorelDRAW Graphics Suite X5 :: TT-Musical Symbols In Drop Down List For CD?

Jan 29, 2012

I have bought the hard copy version of corel draw Suit X5 and waiting for it.  I originally dwn loaded it from the web and so did my son.  We are working on a project together.  He found TT-Musical Symbols in his dwn loaded version and I do not have it on my dwn load version.  Do you have TT-Musical Symbols in your drop down text? and or when you dwn loaded the trail version, have you got it?

View 3 Replies View Related

AutoCAD LT :: Open Drawing Dialog Box Drop Down List Not Working?

Sep 26, 2013

If I click the dropdown list in open command dialog, to select differnet location, it goes blank, after that nothing works,

Need to restart autcad.

how to sloce this issue?

I had reinstalled 2 times but still the problem persists

View 2 Replies View Related

AutoCad :: Creating Drop Down List In Enhanced Attributes Editor

Oct 11, 2012

I have been making a title box for my drawing layout and have been using attributes. all my attributes open in the 'Enhanced Attributes Editor'. But for my Scale option, i was wondering if there was any way of creating a drop down list in the enhanced attributes editor instead of typing the value in each time?

View 9 Replies View Related

CorelDRAW Graphics Suite X5 :: Create Page Size On Drop Down List

May 23, 2013

We use a custom page size of 12" x 16" most all the time. How can I create this page size and add it to the "Page Size" drop list?

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

AutoCAD Visual LISP / AutoLISP :: Nested Drop Down List In A Ribbon Panels?

Feb 22, 2012

how to create a nested drop down list in a ribbon panel.

is it even possible. It must be, but I don’t know how Autodesk managed to do it in the C3D.cuix for the create ground data panel, point drop down.

second question, where is the icon for a drop down list saved.

looking at a C3D dropdown list icon there is no path to the icon, but when I create one it shows a path.

View 3 Replies View Related

Photoshop :: Camera Raw Filter Does Not Show Up On Filter Drop List On CC

May 11, 2013

camera raw filter does not show up on the filter drop list on CC. I am trying to determine why this is the case.  So far everything else seems to work.

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

AutoCAD Inventor :: Populating IDW With Scale

Sep 13, 2013

I am having trouble locating where the default idws pull the scale info from the drawing view. I want to populate my title block with scale, but when I try to edit the text in the format dialog box "view label properties" is not an option see attachment untitled 2. See attachment untitled for the default idw properties which I am trying to emulate.

View 2 Replies View Related

AutoCAD Inventor :: Populating The Keyword IProperty

Dec 9, 2013

I've created a form to fill out with drop down options that link to a multitext parameter. I want to link this parameter to the keyword iproperty but a text parameter will not export.

AutoDesk Inventor 2012

View 1 Replies View Related

AutoCAD Inventor :: Populating Listview - Get Text

Jan 8, 2014

So im populating a listview. The difference between VBA & .Net if massive....... In my Listview, i have 2 columns. I need to do 2 things-

1. select the first row of the newly populated listview

2. select the value from the selected row in the second column

Example

Part            Path
Part1         c:MyPath1
Part2         c:MyPath2
Part3         c:MyPath3
Part4         c:MyPath4

c:MyPath1 is the value i am trying to get.

View 1 Replies View Related

AutoCAD Civil 3D :: File History Is Not Populating

Feb 22, 2013

In Civil 3d 2011 I have always used the windows start menu file history to open recent documents. Its no longer populating that field, but other windows applications are.

View 5 Replies View Related

VideoStudio :: Automatically Populating DVD Menu With Chapter Names

Oct 27, 2013

Am on x5 and Windows 7

Am creating chapters in edit mode and adding chapter names. When I go to create mode I can find no-way to automatically populate the DVD menu with the pre-inputted names i created in edit mode. Assume this must be possible.

View 5 Replies View Related

AutoCAD Inventor :: Populating An Existing Spreadsheet With BOM Data Using ILogic?

Dec 6, 2010

I already have a cut list  template in Excel that calculates my stock material,  volume,  etc when I populate the appropriate fields. It is also connected to an access database that has various information that automatically generates the final price of my product based on various suppliers prices and data with whom I do business with and so on.

I would like to know if there was a way with iLogic to make Inventor populate specific cells with information found in the BOM such as: description; Qty and custom iProperties value like dimensions, etc?

The reason why I'm making a new topic out of this is that I have read previous post about the issue, but they were regarding "exporting the BOM to an excel". I, on the other hand, would like to populate an already existing spreadsheet with data from the BOM

After exploring the iLogic snippets, I've only found the "export" option. It referenced the API snippets, but with limited programming knowledge there is not much I can understand.

View 3 Replies View Related

AutoCAD Civil 3D :: Creating Excel Table For Populating Point Loc And Label Multiple Files

Jan 18, 2013

I have some data in the form of

point#    |    X    |    Y   |    Desc_1   |   Desc_2  |   Desc_3  |....... ect

I would like to make an excel table that i can create multiple points from and make that table dynamic, ie if i edit the table the points will change.I would be labeling the points according to the different desc_# in multiple drawings

Is there any way to do this? I have messed with creating a user defined property classification and creating a new point file format, but i want that point file I imported to be dynamic, and if I change values the values will change in all my drawings.

View 4 Replies View Related

Photoshop :: Printers

Nov 13, 2002

I'm looking at a copier that does 9600x600dpi.

I know the it does 600 dots per inch.

But what is the 9600?

Surely it cant do 9600 horizantal lines by 600 verticle.

View 1 Replies View Related

Photoshop :: Printers, Profiles

Jan 2, 2006

Im running PS CS on a PC and printing (mainly photographic images) with an Epson 1290 using a continuous ink system with Ilford paper. I have calibrated my monitor using a Spyder and have had the printer/paper/ink combination profiled. Despite all of that I am still having problems getting the printed image to match the screen. Quite often there appears to be an enhanced saturated red tint over the image. On some of the B&W images I have also been getting a red/magenta cast in my white highlights!.

I have downloaded new print drivers, I have also had my profile regenerated 3 times all with no effect. I have also just connected my printer to another computer and printed the same images from Elements employing the profile for the printer/paper/ink combo. One image came out more like it should with a reduced red cast but some of the others now appeared fine of both systems after printing them one after the other, i.e. my main system is now looking OK.

View 3 Replies View Related







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