CoPilot X Chat currently not great at writing c# or vb.net Visio code in VS

Started by Visisthebest, June 21, 2023, 01:39:28 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Visisthebest

As just one example, if the prompt is:

"Can you write a c# routine that in Visio copies all shape data rows from one shape to another?"

public void CopyShapeDataRows(Visio.Shape sourceShape, Visio.Shape destinationShape)
{
    foreach (Visio.Row dataRow in sourceShape.DataRows)
    {
        int rowId = dataRow.RowID;
        destinationShape.CopyDataRow(dataRow, rowId);
    }
}


You get code that contains nonsense properties like DataRows, that do not exist in the Visio object model. Copilot is creative, but not usefully so in this case.

I've tried a variety of different prompts and adding further clarifications (like I want it to be based on rownames not index)
but my sense is that Copilot X Chat is not a great Visio programmer yet.

I hope other people have had a better experience, Copilot for generating Typscript/Javascript code has been pretty great in my experience so the potential is certainly there.

If you don't use Copilot X Chat yet and you want me to try a prompt, share it here and I'll share the code that it creates!
Visio 2021 Professional