
Sub MAIN Begin Dialog BenutzerDialog 320, 144, "Feld aus ausgefüllten Punkten" OKButton 119, 114, 88, 21 Text 19, 20, 40, 13, "Ecke:", .Text1 TextBox 133, 17, 160, 18, .Ecke$ Text 19, 41, 48, 13, "Größe:", .Text2 TextBox 133, 38, 160, 18, .Größe$ Text 19, 62, 89, 13, "Waagerecht:", .Text3 Text 19, 83, 74, 13, "Senkrecht:", .Text4 TextBox 133, 59, 160, 18, .Waagerecht$ TextBox 133, 80, 160, 18, .Senkrecht$ End Dialog
Dim Punkte As BenutzerDialog
Punkte.Ecke$ = "0,0"
Punkte.Größe$ = "5"
Punkte.Waagerecht$ = "4"
Punkte.Senkrecht$ = "2"
Dialog Punkte
Abstand$ = LTrim$(Str$(4 * Val(Punkte.Größe$)))
RingBefehl$ = "_DONUT{Eingabe}0{Eingabe}" + Punkte.Größe$ + "{Eingabe}" + Punkte.Ecke$ + "{Eingabe}"
ReiheBefehl$ = "_ARRAY{Eingabe}_LAST{Eingabe}{Eingabe}_RECT{Eingabe}" + Punkte.Senkrecht$ + "{Eingabe}" + Punkte.Waagerecht$ + "{Eingabe}" + Abstand$ + "{Eingabe}" + Abstand$ + "{Eingabe}"
AnwAktivieren "AutoCAD LT", 1
SendKeys "{Esc}{Esc}{Esc}", - 1
SendKeys RingBefehl$, - 1
SendKeys "{Esc}", - 1
SendKeys ReiheBefehl$, - 1
End Sub
Sub MAIN
AnwAktivieren "AutoCAD LT", 1
SendKeys "{Esc}{Esc}{Esc}", - 1
SendKeys "_LOGFILEOFF{Eingabe}", - 1
Kill "d:\aclt95\aclt.log"
SendKeys "_LOGFILEON{Eingabe}", - 1
SendKeys "_LAYER{Eingabe}?{Eingabe}*{Eingabe}{Eingabe}", - 1
SendKeys "_LOGFILEOFF{Eingabe}", - 1
DateiNeuStandard
EinfügenDatei .Name = "d:\aclt95\aclt.log", .UmwandlungBestätigen = 0
AnwAktivieren "Microsoft Word", 1
BeginnDokument
ZeileUnten 6, 1
BearbeitenLöschen
EndeDokument
ZeileOben 5, 1
BearbeitenLöschen
BearbeitenAllesMarkieren
Schriftart "Courier New"
BeginnDokument
End Sub
Dim Shared X, Y
Function StrUS$(n) StrWord$ = LTrim$(Str$(n)) Vorkomma$ = Left$(StrWord$, InStr(1, StrWord$, ",") - 1) Nachkomma$ = Mid$(StrWord$, Len(Vorkomma$) + 2) StrUS$ = Vorkomma$ + "." + Nachkomma$ End Function
Sub Koordinaten(P$) Xvorkomma$ = Left$(P$, InStr(1, P$, ".") - 1) P$ = Mid$(P$, Len(Xvorkomma$) + 2) Xnachkomma$ = Left$(P$, InStr(1, P$, ",") - 1) P$ = Mid$(P$, Len(Xnachkomma$) + 2) X = Val(Xvorkomma$ + "," + Xnachkomma$) Yvorkomma$ = Left$(P$, InStr(1, P$, ".") - 1) P$ = Mid$(P$, Len(Yvorkomma$) + 2) Ynachkomma$ = Left$(P$, InStr(1, P$, ",") - 1) P$ = Mid$(P$, Len(Ynachkomma$) + 2) Y = Val(Yvorkomma$ + "," + Ynachkomma$) End Sub
Sub Punktanfrage
SetPrivateProfileString "General", "EACR_LTAPPS", "0", "d:\aclt95\aclt.ini"
Punkt$ = ""
SendKeys "_ID{Eingabe}", - 1
SendKeys "{Einfügen}", - 1
While Punkt$ = "" Or Punkt$ = "0"
Punkt$ = GetPrivateProfileString$("General", "EACR_LTAPPS", "d:\aclt95\aclt.ini")
Wend
Koordinaten(Punkt$)
End Sub
Sub MAIN
AnwAktivieren "AutoCAD LT", 1
SendKeys "{Esc}{Esc}{Esc}", - 1
Punktanfrage
X1 = X
Y1 = Y
Punktanfrage
X2 = X
Y2 = Y
MittelpunktX = X1 + (X2 - X1) / 2
MittelpunktY = Y1 + (Y2 - Y1) / 2
SendKeys "_CIRCLE{Eingabe}" + StrUS$(MittelpunktX) + "," + StrUS$(MittelpunktY) + "{Eingabe}" + StrUS$(X2) + "," + StrUS$(Y2) + "{Eingabe}"
End Sub
Dies ist ein Shareware-Dokument.
Was ist ein Shareware-Dokument? Hat Ihnen dieses Dokument etwas genutzt? Haben Sie damit Geld gespart? Dann revanchieren Sie sich bitte:
© 1999-2011 by CR/LF GmbH, Essen/Germany. All rights reserved.
No part of this document may be reproduced or published without written consent by CR/LF GmbH.
Last modification: 01.04.2011