- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Why did I use a Sub instead of a function? Simply because I started with a Sub and just kept modifying that to make things work. Also, along the way, I suspected things worked like your advice directed, but I was trying the wrong approach and had multiple byRef references trying to return everything to the Main Subroutine. I switched my code to Functions. It required a little debugging, but cleaner in the end.
I simply uncommented my CreateGeometryProxy statements located in my Main from when I was simply returning the WorkPlane, not the WorkPlaneProxy. I then and added/switched the statements to use another layer of ProxyPlanes(and or Axes, as the case warranted)
Within my Main I switched my CreateGeometryProxy statement from
NA.CreateGeometryProxy(SrchPlane, ProxSrchPlane)
to use the now returned ProxySrchPlane
NA.CreateGeometryProxy(ProxSrchPlane, addProxSrchPlane)
i was then able to create my constraints with
acomDef.Constraints.AddMateConstraint(addProxSrchPlane, RAProxWorkPlane, 0)
I greatly appreciate the help