1

I have some points in 3d and want to add for each of them a drawing text with leader pointing at the right point in the 2d drawing view.

Problems: can't find the right 2d coordinates to point correctly at the projected points in the view because the view it's either a front view/top/side or an isometric one.

All i know : the 3d coordinates (x,y,z) and can find out some vector components of the view ( get some values like 0,0,-1 or 0,-1,-0 or some values like 0.808,0.9777,-0,332 for isometric ones ).

It is a solution based on the view vector components and 3d coordinates to do some transformations to get the 2d coordinates?

CozminC
  • 23
  • 6
  • So, you are projecting a 3d View into 2D and you want to add leaders to the 2D coordinates of the projected points? The leaders will display the coordinates? – GisMofx Sep 01 '15 at 14:08
  • Here is what i am trying to achieve. http://tinypic.com/r/15wl2q8/8 – CozminC Sep 01 '15 at 20:19

1 Answers1

0

Unfortunately, generative elements in a drawing view are not exposed in the VBA api, so you cannot simply make a positional link with a drawing leader to a point from the 3d model.

Alternatively, you could, try to get you points and their XYZ coordinates from the part, and then attempt to create points and leaders using the "Arrows" collection and the Factory2D. You'll need to keep track of your views and the planes which they are projected on to make it work correctly. It's not necessarily difficult, but not straight forward either.

GisMofx
  • 982
  • 9
  • 27
  • I don't need to link the leaders to the generated points. I just need to know the right spots(UV coordinates) in 2D so where I can move the pointing arrows. I think that this problem has a mathematical solution (coordinate transformation). Although I have the 3D X,Y,Z coordinates I don't know how to find the corresponding UV coordinates for 2D views. I have been google-ing for a while about a programming function or some math equation, but didn't manage to find something based on the info's that I know (3d coordinates and that 2D vector) – CozminC Sep 02 '15 at 05:17
  • @CozminC does the "duplicate" answer your question? – GisMofx Sep 02 '15 at 12:20