Custom Linetype issues

Started by NathanVis, March 04, 2020, 07:47:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

NathanVis

This may be the most OCD thing I have ever sought.  I made custom linetypes to show communication wiring; depending if the line is writing right-to-left or left-to-right, sometimes the letters go upside-down. This is really nitpicky, but is there code that I could put into the arc I used to make the C so that it is always oriented "up" no matter which way the line is going?  I tried opening the shapesheet of the arc that is the C and setting LockRotate to 1, but that didn't change the linetype activity.

Paul Herber

In the shapesheet editor set section Text Transform cell TxtAngle = -ANG360(Angle)
Electronic and Electrical engineering, business and software stencils for Visio -

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

NathanVis

The "C" in the linetype is not text-it is an arc because when I tried to do it with an actual text C it would not show up.  I put "=-ANG360(Angle)" into the Shape Transform section cell Angle, but I got the message saying it is "Circular formula reference"

wapperdude

Can you upload an example of your shape?  Sounds like something is blocking view of the letter "C".
Visio 2019 Pro

NathanVis


Visio Guy

Which versions of Visio are showing the "C" in a custom line pattern? I can't recall that every working, and it is certainly not working for me in Visio Plan 2.
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

Visio Guy

For me to see a C, I have to draw a graphical C, fonts don't show in custom line patterns for me.

Regardless, there is no way to have ShapeSheet logic operate on "pattern instances". The pattern is frozen at the time Visio applies it to the line.

I can't think of a solution to this, unless you create specific-purpose lines that have predetermined segments. Ie: you could build an S-shaped connector and control which ways the individual segments were drawn, based on the endpoints of the connector. Reversing the order of the points would change the way the pattern is applied. Kind of a pain, but possible.

If you need arbitrary paths, then there's no way to build a SmartShape that can do it without the assistance of some code.
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

vojo

One possibility:

Create a connector or line group
- place a text box for some message ...say "CCC"
- Give a control handle so you can move it around
- the end points can be moved around for the path you want
- the control handle can place the text where you want it
    - use gravity for orientation perhaps

sort of like attached...needs polish....use controls on left

vojo

could even look at a text transform in the connector shape and use controls to move in that domain
(vs the kludgy pinx / piny I did in 10 min).

First on could be in line (set text background to white)...polish as needed
Second one might have problems with in line since you will need figure out white background on text.