Place the symbols in a hexagonal grid

I am doing a hexagonal map for a role-playing game.  Can someone tell me how I could fill in multiple hexagons (for example, by highlighting a rectangle of them) with a symbol?  I wish that each symbol to Center on each hexagon.  Advice would be greatly appreciated!

Mike

place_symbols_in_hexagons.jpg

just bashed this script together.

GUI is ugly, but it works.

It could be that useful...

(it defines all the symbols in a form square. ie. height = width)

var doc = app.activeDocument;
var sel = doc.selection;
var sym = doc.symbols;
var per;
var w = new Window('dialog');
w.alignChildren["fill","fill"];
var text = w.add('statictext',undefined,"select symbol to place");
var sep = w.add('panel');
sep.minimumSize.height = sep.maximumSize.height = 2;
var list = [];
for(var i = 0; i < sym.length; i++){
    list[i] = w.add('button',undefined,sym[i].name);
    list[i].onClick = function(){
        go(this.text);
        w.close();
    }
}
var g = w.add('group');
g.alignChildern = 'right';
var perT = g.add('statictext',undefined,"percentage of selection size");
var per = g.add('edittext',[0,0,30,20],"80");
w.show();
function go(sy){
    var size = per.text / 100;
    var s = doc.symbols.getByName(sy);
    for(var j = 0; j < sel.length; j++){
        var placed = doc.symbolItems.add(s);
        var Sh = Math.abs(sel[j].controlBounds[3]-sel[j].controlBounds[1]);
        var Sw = Math.abs(sel[j].controlBounds[2]-sel[j].controlBounds[0]);
        var h = Sh*size;
        var w = Sw*size;
        if(w>h){
            placed.height = h;
            placed.width = h;
            placed.top = sel[j].controlBounds[1]-((Sh-h)/2);
            placed.left = sel[j].controlBounds[0]+((Sw-h)/2);
        } else {
            placed.height = w;
            placed.width = w;
            placed.top = sel[j].controlBounds[1]-((Sh-w)/2);
            placed.left = sel[j].controlBounds[0]+((Sw-w)/2);
        }
    }
}

Tags: Illustrator

Similar Questions

  • Is there anywhere to place the symbols so that they persist...

    .. and can be reused several projects?

    Using the import of files does not work (although it should be) you must import it into the library by using the symbol more on the symbols section.

    Simon

  • How to unlock "snap to grid" in the symbol Editor?

    I am trying to edit a section symbol (found in the database of Multisim) and the resolution of the grid in the symbol Editor is too coarse. I tried to disable 'snap to grid', but the ease of doing this seems to be inactive.  There is an icon called 'snap to grid', but there seems to be no State 'disable snap to grid', available.

    Please notify. Thank you, Todc.18

    Hello

    In the Multisim symbol editor Select display > draw grid > grid no., within the limits of drawign, you should now be able to work in mode works.

  • Place all the symbols in layers

    You guys really helped me with your last script and now I'm hoping you could also reverse the script so that I can put all my symbols both in the file and there on the layers? is this possible?

    The dialog box only I could find is in the corner of the symbols palette is "symbol of the Place"... I tried to create an action, but he won't until the next symbol.

    Thank you!

    I did something like that before, not to good layers

    creates a "contact sheet" symbols

    http://forums.Adobe.com/thread/837709

  • Pavilion15-p018nz: Windows logon screen does not display the symbol of 'the eye' to reveal a password and the right arrow (input)

    Which connection to Windows 8.1 the eye symbol and the symbol of the arrow to the right were posted up to that (I think so) after an automatic update of Windows. As I was intending to migrate to Windows 10 I na not invest a lot of research on this problem. Now, after the migration successful Windows 10 Home the problem still exists. After typing the password I can't check it out because the eye symbol is still missing and I have to press 'Enter' because of the clickable right arrow missing for the opening. All this happens with a Microsoft online account. I created an account local and with that, the symbol of the eye, but not the right arrow reappeared. Thanks a lot for help.

    Hi there @CKURT

    Welcome to the Forums of HP Support! It's a good place to find the help you need, so many other users, the HP experts and other members of the support staff. I understand that you want to activate the icon reveal password for your system. I'm happy to help you.

    It depends really on what version of the operating system you are running, because this kind of thing is normally controlled by using the Group Policy Editor. This tool is not a part of a home edition, you need the Pro version or later version for that.

    Assuming that you do not have a pro edition or higher, then it can be a help to you:

    5 ways to access Local Group Policy Editor on Windows 10 - isunshare.com

    Disable or enable the new feature button to reveal a password in Windows 8 - windowsclub.com

    Unfortunately, the version of Windows 10 I installed next to me is that the home edition as well, so I can't access to this, to check, so let me know if it works for you.

  • Add the symbol to the stage based on string of symbols

    Hello

    I am the string to add a symbol on the stage based on a string value in an existing symbol which is on the stage. I get no error when the game turns, but the symbol just reproduce on stage. I have no idea why

    This is the code:

    Variables used

    var score: int = 0

    var startX:int = stage.stageWidth = 920

    var startY: int = stage.stageWidth = 475

    Check to see if the "partition" amounts to 350 in ScoreBoardDisplay.txtScore.text

    If (ScoreBoardDisplay.txtScore.Text == String (350))

    {

    var HD1 = new HealthDrop();

    HD1.x = stage.stageWidth = startX

    HD1.y = stage.stageHeight = startY

    stage.addChild (HD1);

    HealthDrops.push (HD1)

    }

    Assuming you do not penetrate into this framework, when you check the score, but are always there, or at least hang out for a while, the problem is that the conditional code that you show only will run once, immediately entering into this framework.  He is not sitting it monitor any changes in the value of the text field.  You must specify the code to run.

    In this case what you could do is to place this code in a function that runs whenever the textfield value is changed.

    This code that you have to change the value of the TextField?

  • More large thumbnails for the symbols Panel

    I use a lot the symbol Panel.

    I found it is difficult to say what is in the really small symbol of this vignette. Even if I rename them, so a greater number of symbols is equally difficult.

    If my application is:

    Can enlarge you the thumbnails? Like, four times larger? I would rather scroll, rather than place in-> remove-> location-> remove items until I have find the one I want.

    It's just a user to user forum. queries forum is here:

    Illustrator feature requests

    but I think it's kind of a cemetery, unfortunately.

  • Select the symbol on the artboard and copy the name of symbol on behalf of the Board of Directors art

    I'm generating icons in AI CS6

    I have files WITH 100 work plans

    Some Arts Councils are still empty, just underway.

    On the artboard, I gross and paths on a separate layer called symbols with a symbol only.

    The symbol layer could be the layer is visible.

    100 symbols in the document.

    Now, I want to copy these names for the names of art Council for export and a text box on the art map for an overview of printing.

    I found a script to rename a layer in its content - but it does not recognize the symbols

    I found a script to rename a work plan in a layer

    I found a script to place a text box with the name of Council of art on the art map.

    I can't combine them, please help!

    I can make applescript and Filemaker scripts, but I'm new to Javascript.

    Rename the layer to the content - does not recognize symbols!

    function LayerNameMatch() {}

    If (app.documents.length == 0) {}

    Alert ("No. Open/Active Document Found");

    } else {}

    var doc, i, l, ab, salt, n;

    doc = app.activeDocument;

    for (i = 0, l = doc.artboards.length; i < l; i ++) {}

    AB = doc.artboards [i];

    doc.artboards.setActiveArtboardIndex (i);

    doc.selectObjectsOnActiveArtboard ();

    Salt = doc.selection [0];

    sel.parent.Name = sel.name;

    doc. Selection = false;

    }

    }

    }

    LayerNameMatch();

    Work plan and rename the layer name:

    If (app.documents.length == 0) {}

    Alert ("No. Open/Active Document Found");

    } else {}

    var doc = app.activeDocument;

    If (doc.artboards.length == doc.layers.length & & doc.layers.length == doc.artboards.length) {}

    for (var i = 0, l = doc.artboards.length; i < l; i ++) {}

    var ab = doc.artboards [i];

    AB. Name = doc.layers [i] .name;

    }

    Alert ("completed: \nRenaming work plans to match the names of layers is finished");

    } else {}

    Alert ("OPPS: it won't work!") \n the number of layers and work plans do not match");

    }

    }

    Make a Textbox containing the name of art Council

    This script takes the names of artboard to a document and print them in each work plan.

    Tell the script to operate only on the document open and targeted

    myDocument var = app.activeDocument;

    IDoc var = app.activeDocument;

    ilayer var = idoc.layers.add ();

    ILayer.Name = "0 SeitenName";

    STEP 1: create labels for each work plan

    Grab a hold of work plans

    for (var i = 0; i < app.activeDocument.artboards.length; i ++)

    {

    Board graph var = app.activeDocument.artboards [i];

    For each work plan, add a new text block

    myLabel var = myDocument.textFrames.add ();

     

    fill it with the name of the artboard

    myLabel.contents = artboard.name;

    This line controls the font size

    myLabel.textRange.characterAttributes.size = 12;

    This line positions the text against each work plan

    myLabel.position = [artboard.artboardRect [0], artboard.artboardRect [1]];

    }

    You can use this:

    #target illustrator
    function test(){
        var doc = app.activeDocument;
        doc.selection = null;
        for(var i=0; i		   
  • Manually PLACE the images and other files in illustrator

    I see a tutorial of computer graphics by Nigel French, in this tutorial, when the option to place Mr. Nigel used to import images or other illustrator Illustrator files don't auto not put images at the centre but asks where to place the images or how large an area to be covered by this image or file.

    I'm looking at this topic, but not found anything relating to this topic, I don't know if it comes to plugin or illustrator function/feature.

    I hope that you will answer me,

    Here are pictures of serious

    Place 2.JPGplace 3.JPG

    You mean that the 'Gun place' with the symbol "1/1" inside? ".

    This was added in Illustrator CS6 (16.2.1 creative cloud version). If you have a lower version, it isn't here.

  • Issues animating the symbol of another nested symbol instance

    Quite the odd question here got to animate a symbol when mousing over or a symbol that is nested inside a symbol. You can see the example here. Overview of the word VISION. What is happening is another symbol is animated down using JQuery animate function. Mouseover on bring him upward.

    What is really? The symbol sometimes animated up and down uncontrolably. He ends by stops, but not necessarily to the correct place. It's because of all the nesting? I try to keep it as clean as possible, that's why I'm nesting symbols. Much as I would like a model Flash way back when.

    Here's the mouse for btnVision code:

    var myBtnVision = sym.getSymbol ("btnVision");

    myBtnVision.play ();

    try {}

    var point = sym.getComposition () .getStage)

    Stadium. $("secVision").animate ({top: 100}, {duration: 1000});

    } catch (error) {}

    If (console & & console.error) console.error ("an error occurred:" + Error.ToString, error);

    }

    and here's the mouseout/mouseouthandler():

    var myBtnVision = sym.getSymbol ("btnVision");

    myBtnVision.playReverse (500, false);

    try {}

    var point = sym.getComposition () .getStage)

    Stadium. $("secVision").animate ({top: 70}, {duration: 1000});

    } catch (error) {}

    If (console & & console.error) console.error ("an error occurred:" + Error.ToString, error);

    }

    I have a dropbox folder with examples in what follows:

    https://www.dropbox.com/s/ccgapo20p233h7z/rollover.zip

    Solved! It was just a little extra JQuery code that did the trick. Essentially by inserting a stop action.

    try {}

    var point = sym.getComposition () .getStage)

    Stadium. $("secVision").stop () .animate ({top: 100}, {duration: 1000});

    } catch (error) {}

    If (console & console.error) console.error ("an error occurred:" + Error.ToString, error);

    }

  • Combining the symbols in the timeline

    Hello world... I'm new user who is trying to develop the simple game... I use the model to create the game... I was wondering how to insert symbols in the current timeline... which means I'm trying to create new layer and convert it to a symbol but I don't how to combine with existing chronology. Is there someone know about this and help me?

    Thanks in advance!

    Here's a way to do what I think you want to do.  In the menu bar, select Insert-> new symbol-> Movieclip.  Assign a name to describe what it is, and then click OK.

    You can add what you want in the timeline of this new symbol, including the new layers and code and designs etc...

    When you want to go back first to place this symbol in the main scenario for the file, choose Edit-> Edit the Document to return you to the main timeline.  Then to the discovery of the library symbol you just created and place it where you want in the main timeline.

  • Don't leave the symbol swap - Flash with/without warnings

    I have this background image on its own layer that I try to exchange with another graphic symbol, but as I click on the new file, Flash comes out with no return on its own.

    No idea why?

    Save you before you have tried the swap? If you place the image you want to swap on the scene, it appears correctly and without error? You can swap the image on the stage with any other image in the library?

  • Where is the symbol of Copyright in CS5?

    This option has been modified for CS5.

    How can I find the characters so that I can add the copyright symbol in CS5?

    For CS4, it comes to the procedure:

    To insert the copyright symbol, ©, into your web page, follow these steps:

    1. Move your cursor to the place on your web page where you want the symbol to appear.

    2. Select "insert |" Characters and symbols"in the menu. In other words, click on the "Insert" menu and then select the "Characters and symbols" item in the menu that appears.

    3. Select the "Common symbols" box in the dialog box that appears, if it is not already. Click on the arrow down to the box labeled "character: A drop-down list appears, allowing you to select ©.

    4. Once you have selected the desired character, click on the button "insert."  Finally, click the close"" button.

    I did a search on the forums, google and read the faq of DW, but I couldn't find the option.

    As Mylenium says, you can use the text from the Insert panel/bar category. Also use Insert > HTML > special characters.

  • HitTest, code can reside in the symbol?

    I know that I can place a hitTest on an instance of a symbol to help:

    {onClipEvent (enterFrame)}
    If (this.) HitTest (_root.someMC_mc))
    do something
    }


    but is it possible to place the hitTest in the symbol so that all instances of the symbol are the hitTest?

    Thanks in advance!

    It of bad coding, but yes.  timeline of the movieclip:

    {this.onEnterFrame = function ()}

    {if (this.) HitTest (whateverpath. InstanceName))}

    No matter what

    }

    }

  • Unable to get the symbol to save the changes

    I have a symbol in the shared library in FW CS4, & I want to add some graphics to it.  It's not anywhere yet used.

    I open an empty document, put the symbol in it, double-clicking the symbol and saw crumbs of bread, causing the symbol at the top of the page.  I selected modify > symbol > edit symbol and made some changes.

    I went back to my page in the breadcrumbs.  Then I opened a new page, place a copy of the symbol on the page & all the changes I made were on the symbol had disappeared.  How can I save my changes?

    Thank you!

    When you edit a symbol, it doesn't change that the symbol of this document - it does not record changes in the original file of the symbol in the shared library.

    There are two ways to change a symbol and the common library update has changes:

    (1) changing the original file of symbols (for example, "symbol.graphic.png" in the Common Library folder) and then save the file directly back to this place with the same file name (ATTENTION: if it is a symbol of component whose properties can be changed in the symbol properties panel, it is very easy to break the symbol but by changing its object and layer structure.) The modifiable properties depend on the object and change the layer names - these, and the editable symbol will no longer work.)

    (2) open a copy of the symbol you want to change, right-click, and choose "symbol > Break Apart" so that it becomes a normal graphical object is no longer connected to the common library, edit the chart according to the desired, then select all components and press F8 ('create new symbol') - save the symbol from the common library update and give it a new name so that you know what your edited version. (ATTENTION: if it was a symbol of the element with the editable properties, it will lose this editability when you will break and re - save.) You will need to use the command > symbol Script to create the customizable symbol again.)

    Dave

Maybe you are looking for

  • Where FireFox doesn't save screenshots?

    I did a screen capture, but he can't find anywhere. Where can I see what the firefox settings use to save screenshots.

  • iTunes not start radio

    I have an iPhone 5s (iOS 9.2) and for some reason, whenever I type a station to launch imdiately pulling out of the station and displays an ad for my music of free Apple 3 months of the trial. This never happened in the past, so I have no idea what t

  • jumble of text in the web interface after Web Services update / firmware

    I received a message on the screen of my Officejet 6700: Update recommended An update is available for Web Services (ePrint and Apps). Do you want? I chose to update now and it installed fine, or so I thought. I checked the web interface of the print

  • Want packages of 6 t - 1000 faulty hinge

    So, I just sent back my desire 6 t-1000 for the second time today because the left hinge is completely broken and I can't even open up the laptop. I got it for a year and 5 days exactly and my warranty expired, so I pay out of their own pocket for hp

  • Why not my new Flex2 arrived with a user already inside?

    I ordered my laptop direct from Lenovo. When he came yesterday, I turned it on and rather than be asked to put up with my information, it was already loaded with the e-mail address of another person (IE, someone else had already set up). I called twi