CPoint class module
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
CPoint class module

 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA
Author Message
acrctba
Guest





Posted: Thu Dec 09, 2004 11:24 pm    Post subject: CPoint class module Reply with quote

I have a CPoint class module that helps me work with the coordinates of the elements. I don't have to work with arrays. I made something like that:

' change the insertion point of an AcadText
Dim pPoint as CPoint
pPoint = EGUtil.PointFromArray3d(pText.InsertionPoint)

' change coordinates
pPoint.X = 5 : pPoint.Y = 10: pPoint>X = 0#

' save back to original element
pText.InsertionPoint = EGUtil.Array3dFromPoint(pPoint)

If anyone has interest in that contacts me.

Ari C. Raimundo
Engefoto S/A
Curitiba-PR-Brazil

Back to top
Allen Johnson
Guest





Posted: Fri Dec 10, 2004 3:32 am    Post subject: Re: CPoint class module Reply with quote

Why not post it?
Back to top
acrctba
Guest





Posted: Wed Dec 15, 2004 6:18 pm    Post subject: Re: CPoint class module Reply with quote

It's too big to be posted...

I can send you by e-mail...
acrctba@hotmail.com

Back to top
acrctba
Guest





Posted: Wed Dec 15, 2004 6:26 pm    Post subject: Re: CPoint class module Reply with quote

Here's the idea:

Public Function PointToArray3D(ByRef point As CPoint) As Variant
' retorna um array de coordenadas 3d à partir de um ponto

Dim pPoint(0 To 2) As Double

pPoint(0) = point.X
pPoint(1) = point.Y
pPoint(2) = point.Z

PointToArray3D = pPoint

End Function

Public Function Array3DToPoint(ByRef points As Variant) As CPoint
' retorna um ponto à partir de um array 3d

Dim pPoint As New CPoint

pPoint.X = points(0)
pPoint.Y = points(1)
pPoint.Z = points(2)

Set Array3DToPoint = pPoint

End Function
Back to top
Bobby C. Jones
Guest





Posted: Sat Dec 18, 2004 4:16 am    Post subject: Re: CPoint class module Reply with quote

You have a class that represents a point and it's too big to be posted???
I'd love to have a look at it.
--
Bobby C. Jones

"acrctba" <nospam@address.withheld> wrote in message
news:21831792.1103116767056.JavaMail.jive@jiveforum2.autodesk.com...
Quote:
It's too big to be posted...

I can send you by e-mail...
acrctba@hotmail.com
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB