Help with ANGLE tool

Started by ThirdDimension, September 12, 2015, 01:07:01 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ThirdDimension

I would like to be able to manual enter ANGLE degree into the Shape Data box and have the shape adjust accordingly.  However, it looks like angle data is calculated, so it does not have a shape data entry field for degree.

Does anyone have a work around for this?

thanks 3rd

Paul Herber

Electronic and Electrical engineering, business and software stencils for Visio -

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

ThirdDimension

Angle Center from the "Dimensioning - Architecture" template group.

Paul Herber

Like this:
I've added a shape data cell for the required angle, then modified the Control to lock the X value and set the Y value from the shape data.
Electronic and Electrical engineering, business and software stencils for Visio -

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

JuneTheSecond

#4
Or, simply set formula of required angle on shape data made by Paul to SetAtRef(Scratch.B4).
Leave a control point useless.
Best Regards,

Junichi Yoda
http://june.minibird.jp/

ThirdDimension

Thanks Junichi and Paul, I am learning from you guys!

I now have the ability to change angle by data input now.

Is there a way to take it one step further and retaining the manual abilty to adjust angle?

For example, some shapes give you the ability to manually adjust or enter data, such as a "wall" as you can drag it (manually) to lenght OR input data into shape data to adjust the lenght of the "wall".

Is it possible to work this into the angle tool?

JuneTheSecond

How would you like to recover lost formula in controls?
Add a line to user defined section.
Best Regards,

Junichi Yoda
http://june.minibird.jp/

JuneTheSecond

QuoteIs there a way to take it one step further....
You might be possible, but to me not easy.
You may require perfect link among shapes and dimensions, and some intelligence.
It was an interesting challenge in old 2-D cad system about 40 years ago. 

Here is just an example for a shape(triangle) and angle dimension.
Best Regards,

Junichi Yoda
http://june.minibird.jp/

wapperdude

The attached ought to meet your requirements...mostly.  You can enter an angle Data value or use the control point.  The only limitation is angles near 90 deg will fail because of the tan fcn in the formula.  I didn't bother to try and trap the condition with IF fcn, but shouldn't be too difficult.

In the shapesheet, there is the Data property for the angle, and the control point has modifications to both X and Y cells.  The X value has a bound fcn to limit the placement of the control point.  The Y value has the defining formula.  The setatref is used to intercept the control Y position, and use it to overwrite the Data property for angle.  The setatref, returns the Data angle, which has the wrong dimensions (degrees), of course.  So, the the trick is place the entire setatref within the tangent fcn and multipliy by the control's X position to get the proper Y value.  No other changes are needed.  The scratch calcs still work because the X- and Y- positions are still literal. 

One other change was to add DOCMD(1312) to event double click.  So, double clicking the shape will bring up the Data properties Menu window.

Enjoy.
Wapperdude
Visio 2019 Pro

wapperdude

The attached file contains two different measure angle shapes.  Both are fully functional allowing the user to either set the angle by control point or by shape data entry.  These have only been tested for angular units of degrees.  Have no idea what happens with radians, but, pretty sure it's ugly as there are no "interpretive" formulas to switch between these units.

The control point formulas had to be modified to switch between TAN fcn or CTN (i.e., 1/TAN) fcn, and, in so doing X, Y signs had to be adjusted based upon quadrant location.

The implementation involving both X- and Y- control point value cells creates a circular argument warning.  This can be ignored as the SETATREF fcn handles value updating correctly.

Enjoy.

Wapperdude
Visio 2019 Pro

ThirdDimension

Thank you Wapperdude.

that is exactly what I was looking for.  I have added it to my "tools" stencils.

I also like the way it prompt for angle when pulled out of stencils

great job!!!!!

wapperdude

#11
A mathematically simpler implementation is possible.  If the "angle" control point is a fixed radial distance from center of rotation, rather than a "floating" position, then the formulas may use sine and cosine fcns and eliminate the problems associated with tangent fcn.

The logical location of the control point is at the tip of the rotatable extension line.  The attached file includes the same previous angle measure shapes with the above modification. 

Wapperdude
Visio 2019 Pro