pipu123
09-27-2010, 10:55 PM
Every drawing wchich I write in VBA
and I want to start begins with command getpoint
I press F5 to compile. Autocad ask me
:please insert point
[ I use procedure
pktP0 = .GetPoint(, vbCr & "Pick the start point: ") ]
and from that point i create other points using polarpoint method
isoA1hp1pos = .PolarPoint(pktP0, k0Deg, od140p)
Is there a possibility that this first point i set in vba program
and I don't have to every time click on the autocad screen indicate
first point pktP0
I wrote program which doesn't work.Please correct him
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
and I want to start begins with command getpoint
I press F5 to compile. Autocad ask me
:please insert point
[ I use procedure
pktP0 = .GetPoint(, vbCr & "Pick the start point: ") ]
and from that point i create other points using polarpoint method
isoA1hp1pos = .PolarPoint(pktP0, k0Deg, od140p)
Is there a possibility that this first point i set in vba program
and I don't have to every time click on the autocad screen indicate
first point pktP0
I wrote program which doesn't work.Please correct him
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