'Ruderhorn zeichnen sub ruderhorn () dateiname = "c:\users\hermann\Dropbox\Modellflug\cad_cam\ruderhorn\ruderhorn_parameter.txt" 'dateiname muss angepasst werden. Filepicker funktionierte leider nicht, da es nach der 'Auswahl nicht mehr in DevCad weiter geht. 'Gelieferte Parameterdateien werden von mir immer in die ruderhorn_parameter.txt kopiert. set fso = CreateObject("Scripting.FileSystemObject") set datei = fso.OpenTextFile(dateiname, 1) do while not (datei.atEndOfStream) satz = datei.ReadLine() if left(satz,1) = "*" then Cad.Display satz else param = left(satz,instr(satz,chr(9))-1) param = replace(param," ","") split_tab = split(param,"=") 'Cad.Display split_tab(0) & "/" & split_tab(1) select case split_tab(0) case "bs" bs = split_tab(1)*1 '* 1 weil val-funktion zu Fehler führte case "hs" hs = split_tab(1)*1 case "vv" vv = split_tab(1)*1 case "vh" vh = split_tab(1)*1 case "hab" hab = split_tab(1)*1 case "vab" vab = split_tab(1)*1 case "ab" ab = split_tab(1)*1 case "rb" rb = split_tab(1)*1 case "anzb" anzb = split_tab(1)*1 case else Cad.Display "falscher Parameter: " & split_tab(0) exit sub end select end if loop set datei = nothing x = 0 y = vab for ind1 = 1 to anzb bohrung x, y, rb y = y + 4 * rb next ys = y x = hab y = 0 Cad.SendCommand "pline" Cad.SendPoint x,y x = x + vv Cad.SendPoint x,y y = y-hs Cad.SendPoint x,y x = x+bs Cad.SendPoint x,y y = y+hs Cad.SendPoint x,y x = x + vh Cad.SendPoint x,y xsm = x y = ys - rb x = rb Cad.SendPoint x,y ys = y x = x - rb * 4 xs = x Cad.SendPoint x,y y = vab - rb * 3 Cad.SendPoint x,y x = x + rb * 4 Cad.SendPoint x,y x = hab y = 0 Cad.SendPoint x,y Cad.SendCommand "" Cad.SendCommand "fillet" Cad.SendCommand "r" Cad.SendDouble rb * 2 x = 0 y = ys Cad.SendPoint x,y x = xs y = vab Cad.SendPoint x,y Cad.SendCommand "fillet" Cad.SendCommand "r" Cad.SendDouble rb * 2 x = 0 y = vab - rb * 3 Cad.SendPoint x,y x = xs y = vab Cad.SendPoint x,y Cad.SendCommand "fillet" Cad.SendCommand "r" Cad.SendDouble rb * 2 x = 0 y = ys Cad.SendPoint x,y x = hab y =(ys/(rb-xsm))*(x - xsm) Cad.SendPoint x,y end sub 'Hilfsroutine Bohrung setzen sub bohrung (x,y,rb) Cad.SendCommand "circle" Cad.SendPoint x,y cad.senddouble rb end sub