Author Topic: Problems selecting overlapping text  (Read 6711 times)

0 Members and 1 Guest are viewing this topic.

Bald Eagle

  • Jr. Member
  • **
  • Posts: 57
Problems selecting overlapping text
« on: February 29, 2016, 04:26:16 PM »
I have some very large text objects that I'm trying to precisely position.
The trouble arises with certain fonts/typefaces that have a large amount of empty space in their bounding box.
I can't seem to find a place to click in order to select smaller, "less-bounded" text, and trying to drag a selection box doesn't work because the bounding box of the other font/typeface is SO large!
Are there any tricks to "click-through" or otherwise accurately and reliablt select exactly what I need to select?

As always,
Thank you for your help.

Yacine

  • Hero Member
  • *****
  • Posts: 2633
Re: Problems selecting overlapping text
« Reply #1 on: March 01, 2016, 02:25:15 AM »
Hi Bald Eagle,
Use Inkscape to generate the shapes.
Create a regular text, then convert it to paths. Copy paste the result to Visio.
Yacine

Bald Eagle

  • Jr. Member
  • **
  • Posts: 57
Re: Problems selecting overlapping text
« Reply #2 on: March 01, 2016, 09:35:11 AM »
Arg.  Yeah, that's not going to work, since I still have to move and stretch and resize the letters.
Unless what you're suggesting actually gives me SVG objects that will do (most of) the fancy stuff that Chris' WordCloud smart shape does with text...   I will investigate later, since this also ties in with other things I'm doing.

Still learning InkScape, but I now know how to do what you're saying.    Thanks!   :)

Yacine

  • Hero Member
  • *****
  • Posts: 2633
Re: Problems selecting overlapping text
« Reply #3 on: March 01, 2016, 11:26:42 AM »
Alternatively one could find out the margins of the specific font and build up a shape that takes these data into consideration for defining the limits of the shape.
This would be much smarter, ... but tedious.
Yacine

Bald Eagle

  • Jr. Member
  • **
  • Posts: 57
Re: Problems selecting overlapping text
« Reply #4 on: March 01, 2016, 12:46:26 PM »
Yeah - I'm not sure that feasible, and that's probably way outside my present skill set.

That Sheet 4 error in the Word Cloud file is killing me.   Can't save as SVG because of it, so there's no way to export it that way.
Now I've got all of that stuff "stuck" in a file that can't be copied or exported except as png.

Usable, but less than ideal.
Any way to track down where the erroneous reference to Sheet 4 is?
Is there a way to globally search shape sheets and masters?

Surrogate

  • Hero Member
  • *****
  • Posts: 908
    • ShapeSheet™ Knowledge Base
Re: Problems selecting overlapping text
« Reply #5 on: March 01, 2016, 01:25:45 PM »

Surrogate

  • Hero Member
  • *****
  • Posts: 908
    • ShapeSheet™ Knowledge Base
Re: Problems selecting overlapping text
« Reply #6 on: March 01, 2016, 11:27:40 PM »
Visio 2013 gives error 318 on copy with certain shapes.  There are smartshapes in the document stencil which pull in data from the background sheet.   These shapes cause a #318 error when "Copy" is used on any page except background.  The exact same file works perfectly in Visio 2003.

Code: [Select]
An Error (318) occurred during the action Copy.
Referenced cell Pages[Sheet.4]! does not exist

I've spent hours trying to find which cell or formula references Pages[Sheet.4] but I can't find anything.  I also don;t think anything is referencing thedoc which I've found as a possible using search.
This macro can repair your file. It replace formulae in TheDoc cell by their value
it can repair your file in case when document's shapesheet contain formulae like as Pages[sheet.4]
« Last Edit: March 01, 2016, 11:32:02 PM by Surrogate »

Bald Eagle

  • Jr. Member
  • **
  • Posts: 57
Re: Problems selecting overlapping text
« Reply #7 on: March 02, 2016, 08:29:38 PM »
Thanks Surrogate!   :)

Just having some problems with Visio 2007 digesting that code.
Sure looks ok to me, but what do I know...

Any ideas?

JuneTheSecond

  • Hero Member
  • *****
  • Posts: 1027
    • Visio Shapes, Stencils and Sample Drawings
Re: Problems selecting overlapping text
« Reply #8 on: March 02, 2016, 09:30:17 PM »
Please try next and check result.
Debug.Print ActiveWindow.Shape.Name

ActiveWindow.Shape returns page, OK?
Best Regards,

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

Surrogate

  • Hero Member
  • *****
  • Posts: 908
    • ShapeSheet™ Knowledge Base
Re: Problems selecting overlapping text
« Reply #9 on: March 03, 2016, 01:44:11 AM »
ActiveWindow.Shape returns page, OK?
No, my code must modify TheDoc cells
Bald Eagle, you get old code from comments to that article. Try use corrected code !
This macro can repair your file. It replace formulae in TheDoc cell by their value
Code: [Select]
Sub vsd_RepairError318()
Dim cl As Row, ss As Window
Dim n As Integer
n = 0
Dim row_name$, row_value$, row_prompt$, new_prompt$, bl As Boolean
Set ss = Application.ActiveDocument.DocumentSheet.OpenSheetWindow
If ss.Shape.SectionExists(visSectionUser, visExistsAnywhere) Then
For i = ss.Shape.RowCount(242) - 1 To 0 Step -1
    row_name = Application.ActiveWindow.Shape.CellsSRC(visSectionUser, i, visUserValue).RowNameU
    row_formula = Application.ActiveWindow.Shape.CellsSRC(visSectionUser, i, visUserValue).FormulaU
    row_value = Application.ActiveWindow.Shape.CellsSRC(visSectionUser, i, visUserValue).ResultStr("")
    row_prompt = Application.ActiveWindow.Shape.CellsSRC(visSectionUser, i, visUserPrompt).FormulaU
    bl = InStr(row_formula, Trim("Pages["))
 If bl = True Then '
 n = n + 1
 If n = 1 Then new_prompt = "setf(getref(thedoc!user." & row_name & "), " & Chr(34) & Chr(34) & Chr(34) & row_value & Chr(34) & Chr(34) & Chr(34) & ")"
 If n > 1 Then new_prompt = new_prompt & "+setf(getref(thedoc!user." & row_name & "), " & Chr(34) & Chr(34) & Chr(34) & row_value & Chr(34) & Chr(34) & Chr(34) & ")"
 Else
 End If
Next
End If
Debug.Print new_prompt
If Len(new_prompt) > 0 Then
ActiveDocument.DocumentSheet.AddNamedRow visSectionUser, "Err318fix", visTagDefault
ActiveDocument.DocumentSheet.Cells("User.Err318fix.prompt").FormulaU = new_prompt
Application.ActiveWindow.Shape.DeleteRow visSectionUser, ActiveWindow.Shape.RowCount(242) - 1
End If
ss.Close
End Sub
« Last Edit: March 03, 2016, 03:33:36 AM by Surrogate »

Bald Eagle

  • Jr. Member
  • **
  • Posts: 57
Re: Problems selecting overlapping text
« Reply #10 on: March 03, 2016, 09:56:45 AM »
Whoops   :-[

I pasted that in, and it seems to work great!   Thanks!
I posted a note about this on the Visio Guy World Cloud article so that people can easily see that the issue is fixable.
Maybe Chris will fix the source file and repost it so as not to propagate the problem.

I noticed that when I tried to drag a Word Cloud smartshape onto the master (I wanted a default unfilled version), that it changed the color to a dark yellow.   The same thing happens when I copy & paste a Word Cloud shape after running your macro.   That seems like curious behaviour.   Any idea what that's about?

Many, many thanks again!   Great work!    :)    :)    :)

Surrogate

  • Hero Member
  • *****
  • Posts: 908
    • ShapeSheet™ Knowledge Base
Re: Problems selecting overlapping text
« Reply #11 on: March 03, 2016, 10:13:58 AM »
I posted a note about this on the Visio Guy World Cloud article
Thank you! What article are you mean ?

Bald Eagle

  • Jr. Member
  • **
  • Posts: 57