PDA

View Full Version : Replace getpoint



pipu123
09-27-2010, 04:22 PM
Hi
I wrote and it doesn't work
Question : how to put point ptP1 into drawing without command getpoint
later - i would create point ptP2 with command polarpoint , but i use
wrong type of data ?

Please corret that code because it doesn't work

Public Sub liniaz2punktow()
'I would like to set 1 point in Autocad and create another points
' from that point
' how to this this ?

With ThisDrawing.Utility

Dim Object As AcadPoint
Dim Here As Variant


Dim varP1 As Variant
Dim varP2 As Variant

Dim k0Deg As Double

Dim dbLpionL As Double 'podaje wartosc liczbowa


k0Deg = .AngleToReal("0d", acDegrees)

Here(0) = 2: Here(1) = 1: Here(2) = 0

dbLpionL = 500

varP2 = .PolarPoint(Here, k0Deg, dbLpionL)

ThisDrawing.ModelSpace.AddLine Here, varP2

End With
End Sub