Making a shape act like a connector and snap to another shape. Visio - shapes

I'm pretty new to Visio but I'm trying to figure how I could possible design a stencil to snap to a connector marker on another stencil/shape.
I have looked into actually editing the connector itself too see how its designed. I'm wondering If I could recreate the Endpoint on a single location for a shape stencil. Which would snap into place on to the designated shape, when a user drags it on to the worksheet.
Would anyone have any ideas or pointers on how I could achieve this?

I found my solution here.
http://visiozone.com/?p=298
Pretty much I had to take a 1D shape (A line) and Adjust the parameters of its boundary box inside the master shape, then group it too get it to act like a 2d shape. After, I could edit the group and add the shape I wanted then. Deleting the line and adjusting the endpoints.
Highly recommend checking the link out. I hope this helps anyone out there with this issue.
I'm not sure why its really difficult to find information on Visio. Being a 19 year old program. Haha.

Related

Create variants of a document with corresponding labels for AI training

I am looking for an easy solution for the following problem:
I have to create variants of a document and export them as an image. This could be easily done with the MS Word Mail Merge, but I need the pixel positions of every text block in that document. The image as well as the pixel positions are input for an AI training.
At the moment I can think of several approaches:
Throw the MS Word Mail Merge output into an OCR and try to identify the positions of the text blocks by comparing them with the original text source.
Create the document with something like JS, Python or Visual Basic and save the exact positions of each inserted text block at the time of inserting.
Maybe use Visual Basic for Word to extract the text positions from the MS Word XML file that was created with the Mail Merge function.
Variant 1 seems to be overly complicated because it uses some kind of reverse engineering. Additionally, using an OCR even on a perfectly readible document can always be a source of error.
So variants 2 or 3 seem fine, but I don't know any libraries that fit the requirements and Visual Basic for Word is absolutely new territory for me.
I hope I described the problem well enough. If you want me to clarify something, please let me know.
I appreciate every idea and help! :)
Best Regards
Henrik
Seems like someone already dislikes my post. Please let me know how I can improve before voting me down..
Anyway, I may have found a way to realize variant 2. This stackoverflow post references a Github Gist that extends the Python Image Library. It offers a function to write text on an image and also set a maximum width for the text box. The function also returns the final width and height of the drawn text box. Using this I will try to implement an algorithm that creates the document images as well as the label files.
Maybe this will also help someone else looking for the same thing.

Image recolour in Excel

I have a greyscale image with some transparent sections too. I would like to recolour this within excel (based on the value that a user types in a cell or something)
Manually, all I need to do is select the picture then in the ribbon 🡒 format 🡒 colour 🡒 more variations 🡒 more colours and select appropriately. I've tried the macro recorder on these steps but get nothing useful.
Searching the web has led me to believe that the Shape.PictureFormat.Recolor method, which I'm guessing is what I want, is only availible in Publisher. I'd rather not interface with thatfor portability reasons (in case publisher isn't installed), and I'd also like this to run as speedily as possible.
I've even considered converting the image to an array of bytes, performing the required pixel manipulations then converting back to an image, but I think that'll be slow. I also don't have a clue how.
Is there a method in VBA to recolour an image in this way, leaving alpha as it is? Perhaps with the use of an ActiveX image control? Here's an example image in case it's not clear
White 🡒 Green
Black 🡒 Black
Alpha 🡒 Alpha
If you can't find a pure object model based solution, you can try to modify the document xml. It is not the easiest of solutions, but it is far easier than pixel manipulation.
Do like this:
Save your workbook without modification
Do the color change
Save the file again, with a different file name
Unzip the two *.xlsx files you created
Analyze the differences. You'll most likely find it in the drawings folder
Recreate the changes in the xml of the second file in the first one and zip it back together. If that works, you now have a theoretical way to the solution.
If you get this to work, you can automate these steps.

Photoshop jsx image grid

What I am ultimately trying to do is to create a grid of images for print that are minor variations of the same thing (different text is all). Looking through online resources I was able to create a script that changes the text and exports all of the images necessary (several hundred). What I am trying to do now is to import all of these images into a new photoshop document and lay them all out in a grid and I can't seem to find any examples of this.
Can anyone point me in the right direction to place a file at a specific coordinate (I'm using CS5 and have the design suite so if there is a way in illustrator to do this quickly...)?
Also, I'm open to other ideas on how to do this (even other programs) easily. It's for labels so the positioning on the sheet has to be pretty precise...
The art layer object has a translate() method that takes delta x and y params. You'll need to open each image, copy it to the target document, get its current location (using artLayer.bounds) and do the math to find the deltas to position it where you want it. Your deltas can be in pixels so you'll get plenty of precision.
Check out your 'JavaScript Scripting Reference' pdf in your Adobe install directory for more details.
Ok I'm marking Anna's response as the answer because though I didn't fully test it, it seems like it should work and answers the original question with jsx. However I'm also leaving my final solution in case anyone else runs across this with the same issue and may prefer this method as well.
What I ended up doing instead is using InDesign. I figured out that it has a grid option that lets you import a number of files and place them all in an equal grid in a single command. This is almost exactly what I was looking for, except that it leaves a small border/margin in between the columns and grids and mine were designed to meet exactly.
I couldn't figure out how to make it not have the border (I have very little experience with InDesign, it may be possible). However I was able to select all my images and scale them uniformly to be the correct size, then I just selected each column and dragged it over to snap to the adjacent column and the same with rows...

VBA - validating slide against master theme

We have a list of power point template with master slide themes and we distribute this it to all our users, everything works fine if they use they use the theme and they don't change any font, font size or color. But the problem is if they change the font, font size etc, how do we know which shape or text the user changed, basically need to validate the slide against master slide theme.
The problem with your question is that you haven't indicated what you've tried, or where you've looked for an answer. That's why you would have attracted a downvote. (Wasn't me, incidentally, but I've seen that happen before.)
When you're asking a question it's also important to pay close attention to the suggested topics which will update as you type; more than once I've spent time searching for an answer, have given up and was about to ask a question here, and then found exactly what I was looking for in the suggested answers meaning that I didn't have to ask at all. In this case it would be worth checking out the suggested answer:
How to detect Theme fonts in Powerpoint 2007 VBA?
which may not give you exactly what you want, but will give you a place to start.

Create table / grid in a Wireframe Visio 2010 diagram

I'm loving the added Wireframe template and corresponding shapes in Visio 2010. One thing I can't seem to find though (not in Visio, Office help or using Google) is a good way to draw tabular controls.
The only built-in shape that comes close is a List Box of which I can link several together. However this has several disadvantages as this leaves me without "rows" in my table.
Does anyone have a good suggestion on how to do this? I'd prefer a shape that is aware of the Visio2010 'theme' stuff, but at this point any quick way to draw a grid in a wireframe would be much appreciated.
PS. Searching for shapes on "table" gives me lovely picnic-table-shapes but no usable grids. Searching for "grid" gives me one or two shapes which aren't particularly helpful either.
I find Excel a good way to manage grids in Visio. You can easily add and remove columns, manage formating etc.
In Visio 2010 go to Insert -> Object -> Microsoft Excel Worksheet.
Is was looking for the same and found a way:
http://office.microsoft.com/en-us/visio-help/using-shapes-to-create-tables-in-visio-HA001182242.aspx
So you have to search in the stencils "Charting shapes" to find the grid.
Still not that intuitive to work with, but will do.
Insert->Shapes->More Shapes->Charting Shapes->Grid
If we are looking for Visio Stencils for Grid/Table, a great resource can be downloaded here:
http://developer.yahoo.com/ypatterns/about/stencils/
Too bad no one had a solution. I'll mark this response as an answer to my own question then.
The answer to my problem (for so far I could find) in fact then seems to be that you have to work around this omission in Visio by either:
using linked "List box" shapes
use one of the (rather crappy) table shapes you can search for and find online
use a screenshot (or something alike) from another program
If anyone ever lands at this question with a better workaround or even a real solution please be sure to add it.
I use Visio to design wireframes. When I need datagrids or tabular data, I end up using Excel to design a grid with some data and formatting (fonts, size, border, etc.) Then I select the grid in Excel, copy it to clipboard and then Paste Special in Visio and select Image. Not perfect but works for me.
Create the desired table in Excel. Simply copy and paste special as Microsoft Excel Worksheet, and you can then click into it and do whatever you want.
Tip: Color your grid before copying it so that you don't see the Visio gridlines. Looks much nicer on-screen!