that sounds like a pretty intense code to make that happen.
what i like to do is use landmake refrence points, and do it by hand.
this works pretty good for larger scale objects, i've never tried it on
a part or small object.
for example say its a birds i view of a house.
a: wall are relatively vertical (z) axis
b: horizontal lines (stucco joints, brick joints, wall breaks) are
relatively horizontal (x or y)
c: the image was only taken at one point.
therefore once the image is in autocad use the line command to trace a
few z,x,y lines from the presepective drawing (along a roof line, floor
line, wall lines, and other landmarks that can help you get orintated)
then you canget your vanishing points for your perspective, there will
most likely be 3.
with this information you can place the model in 3d space and overlay it
to the realworld perspective. you can also pull the isometric, and
orthographic views from that perspective. some information will be lost
(since you can't see all the faces) however it will give you a starting
point.. oh yah, you'll also need a couple dozen good measurements from
the above object in order to make the scale of the image correct.
Are you looking for "Camera Match"? It will allow you to match your 3D
model (say of an addition) to a photo (say of the existing building). I use
3DViz for 3D rendering at it has this function (not sure if basic AutoCad
does but I'd imagine ADT does since it comes with VizRender).
To make it work with very high accuracy you need 3 points and their
relationship to each other, plus the camera aperture setting.
When done right you can really make it look seamless (if the rendered
materials/lighting is of an equal quality of the photo).
If yopu know the base axis angles you should be able to set up the 3D view
in AutoCAD without too much trouble. If you can set your station point
accurately and know the angle you are looking at the scene from, you could
use the dview command to enter the coordinate directly; better still, draw a
polyline from your station point, rotate it to match the angle, move it up
to eye level and then use dview to select the beginning and end points of
the polyline as the locations for your view.