Thank you. It is nice to share good idea.
By the way I've tried to add a text to the shape.
The macro is modified just a little.
You need to install isometric fonts that were included in piping isometric stencil.
Option Explicit
Sub Orth2Iso()
Dim shp As Visio.Shape
Dim hgt As Double
Dim crnr As Double
Dim dirc As Double
Dim yn As Long
Dim iRowData As Integer
Set shp = ActiveWindow.Selection(1)
crnr = InputBox("Enter corner radius in mm", "Corner", 0)
yn = MsgBox("View frm right ?", vbYesNo, "View Direction")
shp.CellsSRC(visSectionObject, visRowLine, visLineRounding).FormulaU = crnr & " mm"
If yn = vbYes Then
dirc = -45#
Else
dirc = 45#
End If
shp.CellsSRC(visSectionObject, visRowXFormOut, visXFormAngle).FormulaU = dirc & " deg"
ActiveWindow.Selection.Join
Set shp = ActiveWindow.Selection(1)
hgt = shp.CellsSRC(visSectionObject, visRowXFormOut, visXFormHeight).Result(visMillimeters)
hgt = hgt * Sqr(3#) / 3#
shp.CellsSRC(visSectionObject, visRowXFormOut, visXFormHeight).FormulaU = hgt & " mm"
iRowData = shp.AddRow(visSectionProp, visRowLast, visTagDefault)
shp.Section(visSectionProp).Row(iRowData).NameU = "direction"
shp.CellsSRC(visSectionProp, iRowData, visCustPropsLabel).FormulaU = """View Direction"""
If yn = vbYes Then
shp.CellsSRC(visSectionProp, iRowData, visCustPropsValue).FormulaU = """From right"""
shp.CellsSRC(visSectionCharacter, 0, visCharacterFont).FormulaU = "Font(""Isome_Right"")"
shp.CellsSRC(visSectionObject, visRowTextXForm, visXFormAngle).FormulaU = "-30 deg"
Else
shp.CellsSRC(visSectionProp, iRowData, visCustPropsValue).FormulaU = """From left"""
shp.CellsSRC(visSectionCharacter, 0, visCharacterFont).FormulaU = "Font(""Isome_Left"")"
shp.CellsSRC(visSectionObject, visRowTextXForm, visXFormAngle).FormulaU = "30 deg"
End If
End Sub
Sub Iso2Orth()
Dim shp As Visio.Shape
Dim hgt As Double
Dim dirc As String
Set shp = ActiveWindow.Selection(1)
hgt = shp.CellsSRC(visSectionObject, visRowXFormOut, visXFormHeight).Result(visMillimeters)
hgt = hgt * 3# / Sqr(3#)
dirc = shp.Cells("Prop.direction").FormulaU
shp.CellsSRC(visSectionObject, visRowXFormOut, visXFormHeight).FormulaU = hgt & " mm"
If dirc = """From right""" Then
shp.CellsSRC(visSectionObject, visRowXFormOut, visXFormAngle).FormulaU = "45 deg"
shp.CellsSRC(visSectionCharacter, 0, visCharacterFont).FormulaU = "THEMEVAL()"
shp.CellsSRC(visSectionObject, visRowTextXForm, visXFormAngle).FormulaU = "-30 deg"
Else
shp.CellsSRC(visSectionObject, visRowXFormOut, visXFormAngle).FormulaU = "-45 deg"
shp.CellsSRC(visSectionCharacter, 0, visCharacterFont).FormulaU = "THEMEVAL()"
shp.CellsSRC(visSectionObject, visRowTextXForm, visXFormAngle).FormulaU = "30 deg"
End If
ActiveWindow.Selection.Join
End Sub