Help!

Understanding Text

 
  

Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Creating Shapes RSS
Next:  Dell 1855 blade chassis  
Author Message
Nicholas M. Makin
External


Since: Dec 03, 2006
Posts: 4



PostPosted: Sun Dec 03, 2006 12:43 pm    Post subject: Understanding Text
Archived from groups: microsoft>public>visio>createshapes (more info?)

Hello, I am new to Visio and I have been instantly captured. My project is
to develop shapes and a user interface for drawing used in manufacturing
granite countertops. Currently my company does this by hand. AutoCAD really
is too much as well as rather costly. The original plan was to program an
interface to AutoCAD, but why do this when VISIO is almost that right out of
the box? Only problem is that Visio's shapes are not quite what we need.
Lucky we have a very underutilized programmer on staff. : )

However I would imagine that I will end up posting many questions because I
am crunched for time and entering a new development environment.

Question 1: Where is the text? I created a Master, inserted a rectangle and
then added 2"dimension" lines to show the height and width. These lines were
created using the "guide" style since I do not want them to print. After the
lines were created I double clicked on them and entered text. Now my goal is
to set that text to the length of its associated line. Problem is, I don't
know where that text is. There is no "Text Field" property associated with
the lines. The TextBlock section will reformat the text and HideText=True
will hide the text. Where is the text held? When I first tried this I had a
TextField Section but I could not get one for each line, now I have text
with each line but no TextField to edit. (and yes I ensured that all
sections were displayed, and no I can't add a TextField section).

Question 2: (Answered in the process of gathering info to frame the
question.... worked out). For one reason or another I could not use the name
of the shape when entering a formula into the Actions section, but I
replaced the name with the ID and it works.
Back to top
John Marshall, MVP
External


Since: Jan 26, 2004
Posts: 1477



PostPosted: Sun Dec 03, 2006 4:06 pm    Post subject: Re: Understanding Text [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Each Visio shape has a single block of text that can be accessed by
"Shape.Text" or the Character collection. When you group a collection of
shapes, you end up with a block of text for each shape and one for the new
container shape. Normally I make changes in the User section of the
container shape and let the individual shape reference the container shape.

John... Visio MVP

Need stencils or ideas? http://visio.mvps.org/3rdparty.htm
Need VBA examples? http://visio.mvps.org/VBA.htm
Visio Wishlist http://visio.mvps.org/wish_list.htm

"Nicholas M. Makin" <nmaximillian.RemoveThis@yahoo.com> wrote in message
news:u66W8rwFHHA.3616@TK2MSFTNGP02.phx.gbl...
> Hello, I am new to Visio and I have been instantly captured. My project is
> to develop shapes and a user interface for drawing used in manufacturing
> granite countertops. Currently my company does this by hand. AutoCAD
> really is too much as well as rather costly. The original plan was to
> program an interface to AutoCAD, but why do this when VISIO is almost that
> right out of the box? Only problem is that Visio's shapes are not quite
> what we need. Lucky we have a very underutilized programmer on staff. : )
>
> However I would imagine that I will end up posting many questions because
> I am crunched for time and entering a new development environment.
>
> Question 1: Where is the text? I created a Master, inserted a rectangle
> and then added 2"dimension" lines to show the height and width. These
> lines were created using the "guide" style since I do not want them to
> print. After the lines were created I double clicked on them and entered
> text. Now my goal is to set that text to the length of its associated
> line. Problem is, I don't know where that text is. There is no "Text
> Field" property associated with the lines. The TextBlock section will
> reformat the text and HideText=True will hide the text. Where is the text
> held? When I first tried this I had a TextField Section but I could not
> get one for each line, now I have text with each line but no TextField to
> edit. (and yes I ensured that all sections were displayed, and no I can't
> add a TextField section).
>
> Question 2: (Answered in the process of gathering info to frame the
> question.... worked out). For one reason or another I could not use the
> name of the shape when entering a formula into the Actions section, but I
> replaced the name with the ID and it works.
>
>
>
>
>
Back to top
Nicholas M. Makin
External


Since: Dec 03, 2006
Posts: 4



PostPosted: Sun Dec 03, 2006 8:31 pm    Post subject: Re: Understanding Text [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thank you John but I was trying to use the ShapeSheets as much as I could
before resorting to automation. So far here is what I have done: I went to
the <Insert><Fields> and inserted a "general" field. This gave me the
TextFields section I had before. From here I was able to set both the
"format" and the "value" cells. This kind of beings up another question
though.

To get the text field to display the measurement in fractional units I had
to use two scratch cells B and C.

Cell B=ROUND((Fields.Value-INT(Fields.Value))*16,0)

This gives me the numerator if I had used the format formula "# #/16 u"
Problem being that if my value were say 2.25 this would display "2 8/16 in."
not "2 1/2 in."

Cell
C=IF((Scratch.B1/2-INT(Scratch.B1/2))*2=0,IF((Scratch.B1/4-INT(Scratch.B1/4))*2=0,IF((Scratch.B1/8-INT(Scratch.B1/Cool)*2=0,"#
#/2 u","# #/4 u"),"# #/8 u"),"# #/16 u")

This tested my numerator to first see if it were divisible by 2, if not I
can use the "#/16" else I check to see if it is divisible by 4. If it were
divisible by 2 but not 4 then I know to use "#/8" etc.

Question is: Is there some easy solution to this formating. This seems to
work but would be alot easier if the ShapeSheets had a MOD operator or
function.

About the previous question. In the investigation process I had set a
scratch cell A=TheText and it displayed the text. But there is no TheText
cell. As far as I can tell the only way to get control of the text in the
ShapeSheet is to assign it a field. (when I inserted the field the old text
disapeared, replaced with the field, I wonder if that text isn't still there
somewhere).
Back to top
John Marshall, MVP
External


Since: Jan 26, 2004
Posts: 1477



PostPosted: Mon Dec 04, 2006 9:14 am    Post subject: Re: Understanding Text- Off to the Office 2007/Vista launch [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Most of it can be done through the shapesheet. If you open the Master to
edit, there is a tree structure in the Master Explorer window that will let
you explore the shapes that make up a master. The names are all of the form
Sheet.5. To reference something in the top shape from one of the subordinate
shape use Sheet.5!Width. Unfortunately, the Insert Field does not allow you
to do this abstraction. So you could use the value within the shape and put
Sheet.5! in front of the results or you can add User fields to the shape
that reference the top shape.

You should be able to play with the Formatting on the Insert Field to get
the write format without using a formula.

I'm off to the launch of Visio 2007/Office 2007 and Vista in Toronto, so I
will be offline for a few days. Al or Chris should pick up the thread if
there are questions.

John... Visio MVP

Need stencils or ideas? http://visio.mvps.org/3rdparty.htm
Need VBA examples? http://visio.mvps.org/VBA.htm
Visio Wishlist http://visio.mvps.org/wish_list.htm

"Nicholas M. Makin" <nmaximillian RemoveThis @yahoo.com> wrote in message
news:uBiBcx0FHHA.1188@TK2MSFTNGP06.phx.gbl...
> Thank you John but I was trying to use the ShapeSheets as much as I could
> before resorting to automation. So far here is what I have done: I went to
> the <Insert><Fields> and inserted a "general" field. This gave me the
> TextFields section I had before. From here I was able to set both the
> "format" and the "value" cells. This kind of beings up another question
> though.
>
> To get the text field to display the measurement in fractional units I had
> to use two scratch cells B and C.
>
> Cell B=ROUND((Fields.Value-INT(Fields.Value))*16,0)
>
> This gives me the numerator if I had used the format formula "# #/16 u"
> Problem being that if my value were say 2.25 this would display "2 8/16
> in." not "2 1/2 in."
>
> Cell
> C=IF((Scratch.B1/2-INT(Scratch.B1/2))*2=0,IF((Scratch.B1/4-INT(Scratch.B1/4))*2=0,IF((Scratch.B1/8-INT(Scratch.B1/Cool)*2=0,"#
> #/2 u","# #/4 u"),"# #/8 u"),"# #/16 u")
>
> This tested my numerator to first see if it were divisible by 2, if not I
> can use the "#/16" else I check to see if it is divisible by 4. If it were
> divisible by 2 but not 4 then I know to use "#/8" etc.
>
> Question is: Is there some easy solution to this formating. This seems to
> work but would be alot easier if the ShapeSheets had a MOD operator or
> function.
>
> About the previous question. In the investigation process I had set a
> scratch cell A=TheText and it displayed the text. But there is no TheText
> cell. As far as I can tell the only way to get control of the text in the
> ShapeSheet is to assign it a field. (when I inserted the field the old
> text disapeared, replaced with the field, I wonder if that text isn't
> still there somewhere).
>
>
>
Back to top
Nicholas M. Makin
External


Since: Dec 03, 2006
Posts: 4



PostPosted: Mon Dec 04, 2006 9:04 pm    Post subject: Re: Understanding Text- Off to the Office 2007/Vista launch [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

John,

I am sorry you will not be able to see this for a while but: THANK YOU!!!

Just finding the "Master Explorer" window has helped tremendously! I had
added some GUARD values which seemed to make selecting my sub-shapes very
difficult. I was really irritated that no such window seemed to exist (when
learning a new office product/version I really hate the feature which hides
the less used menu items). Thank you very much for pointing that out.

I have moved passed the basic rectangle and have started with my first
shape: a basic right angle "L" shaped counter with a control which can edit
a chamfer between the two sides. Very similar to the "L-shaped countertop"
shape that comes with VISIO. My version has added features such as counter
width and dimension lines. Right now my problem is with the interaction of
the shapes, but this may quickly be solved now that I can look at them in
the Master Explorer.

Thank you for your help.
Back to top
John Marshall, MVP
External


Since: Jan 26, 2004
Posts: 1477



PostPosted: Wed Dec 06, 2006 1:18 pm    Post subject: Re: Understanding Text- Off to the Office 2007/Vista launch [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I'm back and glad that the suggestion helped.

John... Visio MVP

Need stencils or ideas? http://visio.mvps.org/3rdparty.htm
Need VBA examples? http://visio.mvps.org/VBA.htm
Visio Wishlist http://visio.mvps.org/wish_list.htm

"Nicholas M. Makin" <nmaximillian.DeleteThis@yahoo.com> wrote in message
news:u2AMYoBGHHA.4116@TK2MSFTNGP05.phx.gbl...
> John,
>
> I am sorry you will not be able to see this for a while but: THANK YOU!!!
>
> Just finding the "Master Explorer" window has helped tremendously! I had
> added some GUARD values which seemed to make selecting my sub-shapes very
> difficult. I was really irritated that no such window seemed to exist
> (when learning a new office product/version I really hate the feature
> which hides the less used menu items). Thank you very much for pointing
> that out.
>
> I have moved passed the basic rectangle and have started with my first
> shape: a basic right angle "L" shaped counter with a control which can
> edit a chamfer between the two sides. Very similar to the "L-shaped
> countertop" shape that comes with VISIO. My version has added features
> such as counter width and dimension lines. Right now my problem is with
> the interaction of the shapes, but this may quickly be solved now that I
> can look at them in the Master Explorer.
>
> Thank you for your help.
>
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Creating Shapes All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum