Assigning shapes to layers using shape data

Started by leweyb, February 02, 2018, 11:33:47 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

leweyb

Hello eveyone!

I could really use some help, I'm not an expert using vba so any information would be entirely appreciated!

To explain the situation first:
I am creating a Rack Diagram with multiple bits of equipment in lots of racks. I have an excel sheet with hundreds of lines detailing the properties for each piece of equipment, I will import this excel database to visio to populate the equipments shape data. There are three main properties in which the equipment has, the shapesheet for each equipment will display three fields, Property 1, Property 2 and Property 3.

What I want to be able to achieve:
When I import the data from excel onto the shape data, I want a button that will do the following with all the shapes on the page, (sort of an update button)

Add shape to layer called "*whatever is in the field of property 1 of the shape data*" and if that layer does not exist already with that name then -> create the new layer with that name and add the equipment to it.

Then do the above for property 2 of the sape data and then again for property 3.

Help is much appreciated with this!