Help with Automation on droping shape

Started by Alan.TF, May 30, 2013, 04:19:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Alan.TF

I am trying to crate new shapes for a new template whilst I seem to be able to do this I would like to achieve some degree of automation.

The best way to describe this is to say I have a Panel door which can be hinged on the left or right hand side.
On dropping the shape on the drawing I would like to ask "RHS Hinge" or "LHS Hinge" and then flip the shape so the handle and door layout are correct

Can anyone give me some guidance on where to start

I have done some VBA in Excel but looking at some of the electrical symbols (Limit switch where it can be open or closed) and the associated  shape sheet I'm not sure of the best way

Many thanks

Paul Herber

There are two ways of doing this ( I'm assuming here that the hinges/handle are parts of a grouped shape)
In both cases make the LHS/RHS option a custom property (Shape Data) and arrange to ask the user when the shape is dropped. Use 0 and 1 (or 1 and 2) for the actual values.

1. have one set of shapes for the hinges/handle and use the shape data within a formula to change the shape X/Y coordinates and its FlipX flag.
or
2. have 2 sets of shapes for the hinges/handles (one set each for LHS/RHS and use the shape data to control the shape visibility.

Option 2 is easier to arrange but makes the shape take up more resources.
Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/