Create a Chamfered Wire with Pythom

Hello. I am attempting to use a python code in order to create a chamfered wire from one location to another location (I select 2 objects for reference locations in this project). I copied over the code from this post Python error: Creating Chamfered Wires with python , however I cannot seem to get it to work. I have attached a picture of my work and the python code.

Automatic Wire Drawing.dyn (22.7 KB)

import clr
from Autodesk.DesignScript.Geometry import *

import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
from System.Collections.Generic import List

#convert the dynamo points to Revit XYZ points:
points = [x.ToXyz() for x in IN[0]]
#put the points in a generic List:
vertexpoints = ListXYZ

import Revit

import Autodesk
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Electrical import *

import DSCore
from DSCore.List import *

import sys
pyt_path = r’C:\Program Files (x86)\IronPython 2.7\Lib’

connectors = IN[0]
vrtxpts = UnwrapElement(IN[1])
wiretyp = UnwrapElement(IN[2])
curview = UnwrapElement(IN[3])

doc = DocumentManager.Instance.CurrentDBDocument
wireTypeId = wiretyp[0].Id
view = curview.Id
wiringType = WiringType.Chamfer
vertexPts = vrtxpts
sConnector = connectors[0]
eConnector = connectors[1]

wirecreation = Wire.Create(doc,wireTypeId,view,wiringType,vertexPts,sConnector,eConnector)
OUT = wirecreation

Im not sure whats causing the issue. What is the error message of the node?
It might be the fact that the vertexpoints should be offset from the startpoint and endpoint.
try making a line from startpoint to endpoint, then offset that line perpendicular, and create point at parameter 0.1 and 0.9, take those two points and input them as vertexpoints instead.
Hope that helps!

I also found an old file that might be of use. I was not able to open it and look at this moment, but hopefully you can find some useful info from this graph.
Chamfered Wires along line.dyn (66.1 KB)