Geometry3.X/Y1

Started by novski, November 26, 2015, 08:48:39 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

novski

Hi
I have another strange behavour of a Geometry section.
In this sample i tryed to make a Dotted endpoint where the connector endpoint is in the middle of the Circle.
It works for the Begin of the connector but not for the end of it.
I don't think its related to the disscussed mal behavour in this thread: http://visguy.com/vgforum/index.php?topic=6877.0
because it also happens outside that 5mm range.
You can see that the begin has a nice circle but the end circle somehow follows the beginX/Y point..
How can i get a nice circle following the end of my connector?
Thanks
Novski

Yacine

I presume, you did not set up the line end properly.
Check the attachment.
Yacine

novski

#2
Hmm
I see, that looks like a normal Begin/End option, shapesheet:Begin/EndArrow nr. 254.
But if i add that to my connector those nice circles don't apear...
I looked through the hole shapesheet and changed all differences to your values but sill no circles. how come?
And why does your page show a lineendstyle "Master.2". What is that and how did you add that?
Regards, Novski

Edit: Found it. THX!

Yacine

#3
Hi Novski,
Had a look at your shape and saw that you added a geometry section for both the line ends.
Nice, but as you can see the result is not always predictable.
As a general matter, I would never try to mess directly in a connector shape. The code behind it messes up all the good work you invested in.

The shape I sent you, uses custom line ends. Select the connector and assign it the line end master of choice.
To create a line end: In the drawing explorer, you just right click on the folder line ends and add one with the desired name. (In my case I did not write a name, so Visio called it Master.2)
There are many options to play with to get the right result.
Also the first thing I do is to reduce the page size of the master to a reasonable 20x20 mm as to properly see the page centre.
The page centre being the end of your line end.

Check the new attachment.
Yacine

novski

An additional Question to that Topic...

I have a list and that list alwalys gives out 254 in stead of USE("Dot1")
=IF(User.StyleEndsInd=3,5,IF(User.StyleEndsInd=4,5,IF(User.StyleEndsInd=5,5,IF(User.StyleEndsInd=6,5,IF(User.StyleEndsInd=7,42,IF(User.StyleEndsInd=9,USE("Dot1"),0))))))

How can i parse the full formulae "USE("Dot1") to the BeginArrow Cell? 

Thanks once again, and Happy Hollydays, Novski

Surrogate

i am think that it impossible in shapesheet...

Yacine

Have you tried setatref instead of the formula itself?
Yacine

wapperdude

#7
The "254" is a value placeholder, not sure what it represents, perhaps has to do with custom line end. 

It is possible to type in the literal "IF" statement that you indicate, and because Use("DOT1") has double quotes, no error is returned.  However, if a custom line end, named DOT1, is not defined, then, the result is no line end whatsoever.

Not sure why you need to "parse" the formula.  It works fine.  Easy to demonstrate.  In Yacine's Visio file, add the Use.StyleEndsInd entry to the User Defined section in shapesheet.  Set its value = 9.  Next, paste your "IF" statement into both the BeginArrow and EndArrow cells.  In one of those two cells, change the DOT1 to Master.2 or Master.12.  Leave the other one unchanged.  The unchanged entry will have no line end, the changed entry will have either the Master.2 or Master.12, whichever you put in the formula.

Bottom line, the "254" is not the issue, nor is the "IF" statement, nor is the User.StyleEndsInd entry.

HTH
Wapperdude
Note:  tested using V2007
Visio 2019 Pro

Yacine

#8
I had to look for a very old post of mine to find out how to insert a formula into a cell instead of getting a string.
Ie: to insert =USE("Dot1") instead of "=USE(""Dot1"")"
(http://visguy.com/vgforum/index.php?topic=1714.0 for what it's worth)

So I worked on your problem as follows:
1) Simplified the IF statements by setting up 2 lists: 1 for the input values (user.StyleEndsInd), 1 for the according lines ends (user.LineEnds).
2) I used prop fields to do the calculation, you'll probably use user fields.
So prop.row_2 = INDEX(LOOKUP(Prop.Row_1,User.StyleEndsInd,";"),User.LineEnds,";")
3) In the user section I added a SETF formula to write the formula in the EndArrow cell: SETF(GetRef(EndArrow),"="&Prop.Row_2) ("="&... is the trick to get the formula written in the cell).

My pleasure,
Y.
Yacine

novski

Ok i finaly got that working. Yacine Thanks a lot for your inputs it was worth a lot.
I use only 8 presets. some with EndArrow some with BeginingArrow and some with both and because sometimes the Arrow it to big also i 2 sizes. So i had to do it in a if() way (maybe also because my brain can't handle 6 index. maybe not)
But here is how it works:

User.StyleEndsLst="kein;Senke Klein;Senke Gross;Quelle Klein;Quelle Gross;Pfeil-Pfeil Klein;Pfeil-Pfeil Gross;Punkt an Quelle;Punkt an Senke;Punkt - Punkt" (thats German  :))
User.StyleEndsInd=LOOKUP(Prop.StyleEnds,User.StyleEndsLst,";")
User.StyleArrowBegin=SETF(GetRef(BeginArrow),IF(User.StyleEndsInd=3,5,IF(User.StyleEndsInd=4,5,IF(User.StyleEndsInd=5,5,IF(User.StyleEndsInd=6,5,IF(User.StyleEndsInd=7,"=USE("&"""Dot1"""&")",IF(User.StyleEndsInd=9,"=USE("&"""Dot1"""&")",0)))))))
User.StyleArrowEnd=SETF(GetRef(EndArrow),IF(User.StyleEndsInd=1,5,IF(User.StyleEndsInd=2,5,IF(User.StyleEndsInd=5,5,IF(User.StyleEndsInd=6,5,IF(User.StyleEndsInd=8,"=USE("&"""Dot1"""&")",IF(User.StyleEndsInd=9,"=USE("&"""Dot1"""&")",0)))))))
User.StyleArrowSizeBegin=SETF(GetRef(BeginArrowSize),IF(User.StyleEndsInd=3,0,IF(User.StyleEndsInd=4,1,IF(User.StyleEndsInd=5,0,IF(User.StyleEndsInd=6,1,0)))))
User.StyleArrowSizeEnd=SETF(GetRef(EndArrowSize),IF(User.StyleEndsInd=1,0,IF(User.StyleEndsInd=2,1,IF(User.StyleEndsInd=5,0,IF(User.StyleEndsInd=6,1,0)))))
prop.StyleEnds.Value=INDEX(0,Prop.StyleEnds.Format)
prop.StyleEnds.Format=User.StyleEndsLst


Regards, Novski