Sub ConnPts()
Dim vsoShp As Visio.Shape
Dim iRow As Integer
Dim vsoRow As Visio.Row
iRow = 0
Set vsoShp = ActiveWindow.Selection(1)
vsoShp.AddRow visSectionConnectionPts, iRow, 0
Set vsoRow = vsoShp.Section(visSectionConnectionPts).Row(iRow)
With vsoRow
.Cell(visCnnctX).FormulaU = "Width*0"
.Cell(visCnnctY).FormulaU = "Height*0.5"
End With
vsoShp.AddNamedRow visSectionConnectionPts, "P" & iRow + 1, visTagCnnctNamedABCD
Set vsoRow = vsoShp.Section(visSectionConnectionPts).Row(iRow + 1)
With vsoRow
.Cell(visCnnctX).FormulaU = "Width*1"
.Cell(visCnnctY).FormulaU = "Height*0.5"
End With
vsoShp.AddRow visSectionConnectionPts, iRow + 2, 0
Set vsoRow = vsoShp.Section(visSectionConnectionPts).Row(iRow + 2)
With vsoRow
.Cell(visCnnctX).FormulaU = "Width*0.5"
.Cell(visCnnctY).FormulaU = "Height*1"
End With
End Sub
Sub AddConnectionPointRow(s As Shape)
On Error GoTo IsNamed
s.AddRow visSectionConnectionPts, 0, visTagCnnctPt
GoTo Done
IsNamed:
s.AddRow visSectionConnectionPts, 0, visTagCnnctNamed
Done:
End Sub
void AddConnectionPointRow(Shape s) {
try {
s.AddRow(VisSectionIndices.visSectionConnectionPts, 0, VisRowTags.visTagCnnctPt)
} catch {
s.AddRow(VisSectionIndices.visSectionConnectionPts, 0, VisRowTags.visTagCnnctNamed)
}
}
Quote from: wapperdude on May 15, 2024, 06:53:18 PM2) if something has been deleted, how can you test it? BTW, that's rhetorical.
Quote from: dbramblett on May 15, 2024, 03:02:08 PMWithout opening the shape sheet and manually adding a row to see what happens, how can I query the object and test for it?IMHO No way! You cant define it without adding rows and check its type
Quote from: Surrogate on May 15, 2024, 02:45:38 PMWhen you add connection points via User Interface these connection points are unnamed! If you make one of them as named point, it make all points as named...
Quote from: Yacine on May 14, 2024, 09:18:51 PMEnjoy you Honeymoon, and greetings from me and the whole Visguy core team to your wife.Absolutely! Thomas my congratulations to you!!!
Quote from: Yacine on May 14, 2024, 09:18:51 PMPPPS - COM, absolutely!I've made timid attempts to use Python in AutoCAD.