- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, im a newby in this topic of com automation, im trying to make a draw in Autocad via a third program. I'm able to connect with autocad and also draw a line, the point is thati don't draw the line iwant. I need two 3d real*8 points ie. p1=(/0.0,0.0,0.0/), p2= (/100.100,0.0,0.0/)representing the start and end of a line. I make that pionts via safearraycreate. But when i send the command to autocad, i only can create a supersmall line, of distance=0. I think the points are not being well created in safearray but i dont know how to view the array values because is a pointer, Do anybody knows?.
Thanks!!!
This is the code
......
ndimcon=1
sabounds%lbound=0
sabounds%extent=3
pstartpointSA= safearraycreate(vt_r8,nDimCON,saBounds)
pendpointSA= safearraycreate(vt_r8,nDimCON,saBounds)
bcoordinate=0.0
do icol=0,2
IRET=safearrayputelement(pStartPointSA,icol,loc(bcoordinate))
end do
bcoordinate=100.0
IRET=safearrayputelement(pEndPointSA,0,loc(bcoordinate))
bcoordinate=100.0
IRET=safearrayputelement(pEndPointSA,1,loc(bcoordinate))
bcoordinate=0.0
IRET=safearrayputelement(pEndPointSA,2,loc(bcoordinate))
! 5 indidcates real*8 nubers for autocad internal conversion to variant types
istatus= $iacadUtility_createtypedarray(putil,startpoint,5,pstartpointSA)
istatus= $iacadUtility_createtypedarray(putil,endpoint,5,pendpointSA)
istatus= $iacadblock_addline(pMspace, Startpoint,endpoint, pline)
iret=safearraydestroy(pstartpointSA)
iret=safearraydestroy(pendpointSA)
.......
Link Copied

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page