Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Macro for Sprocket
#19
I simpified this
Code:
'From >
If k=1 Then
dcSetDrawingUnits dcMillimeters
ElseIf k=2 Then
dcSetDrawingUnits dcInches
ElseIf k>2 Then
k=1
End If

'To this >

If k<>2 Then
   dcSetDrawingUnits dcMillimeters
   k=1
   kText$="MM"
Else
   dcSetDrawingUnits dcInches
   kText$="Inches"
End If

And change this line
Code:
'From >
dcSetTextParms dcRED, “Arial”, “Normalny”, 0,2,0, 0.1, 0

'To this >

If k=1 Then
  dcSetTextParms dcRED, “Arial”, “Normalny”, 0,2,0, 0.1, 0
Else
  dcSetTextParms dcRED, “Arial”, “Normalny”, 0,50,0, 0.1, 0
End If

And I added the Units setting to the text
Code:
'From this >
SprText$ = "Teeth=" + Str$(Tn) + NL$
  SprText$ = SprText$ + "Pitch=" + Str$(P) + NL$
  SprText$ = SprText$ + "Roller_D=" + Str$(Rd) + NL$
  SprText$ = SprText$ + "Pitch_D=" + Str$(Pr*2) + NL$
  SprText$ = SprText$ + "Max_D=" + Str$((Pr+(Rd*0.35))*2)

'To this >
SprText$ = "Teeth=" + Str$(Tn) + NL$
  SprText$ = SprText$ + "Pitch=" + Str$(P) + NL$
  SprText$ = SprText$ + "Roller_D=" + Str$(Rd) + NL$
  SprText$ = SprText$ + "Pitch_D=" + Str$(Pr*2) + NL$
  SprText$ = SprText$ + "Max_D=" + Str$((Pr+(Rd*0.35))*2)+ NL$
  SprText$ = SprText$ + "Units=" +kText$

The text was there, it was very small, needed to be 25 times larger for inches.
Reply


Messages In This Thread
Macro for Sprocket - quarkqq - 09-07-2020, 11:31 AM
RE: Macro for Sprocket - AlwMVMO - 09-07-2020, 06:15 PM
RE: Macro for Sprocket - quarkqq - 09-08-2020, 08:42 AM
RE: Macro for Sprocket - AlwMVMO - 09-08-2020, 11:39 PM
RE: Macro for Sprocket - quarkqq - 09-09-2020, 09:08 AM
RE: Macro for Sprocket - AlwMVMO - 09-10-2020, 10:59 AM
RE: Macro for Sprocket - williamj - 09-10-2020, 02:52 PM
RE: Macro for Sprocket - quarkqq - 09-28-2020, 01:52 PM
RE: Macro for Sprocket - williamj - 09-28-2020, 05:20 PM
RE: Macro for Sprocket - AlwMVMO - 09-29-2020, 12:59 AM
RE: Macro for Sprocket - williamj - 09-29-2020, 07:44 AM
RE: Macro for Sprocket - quarkqq - 10-01-2020, 02:28 PM
RE: Macro for Sprocket - AlwMVMO - 10-02-2020, 12:16 AM
RE: Macro for Sprocket - quarkqq - 10-02-2020, 10:23 AM
RE: Macro for Sprocket - williamj - 10-02-2020, 12:09 PM
RE: Macro for Sprocket - AlwMVMO - 10-03-2020, 02:18 AM
RE: Macro for Sprocket - williamj - 10-03-2020, 06:38 AM
RE: Macro for Sprocket - quarkqq - 10-03-2020, 12:44 PM
RE: Macro for Sprocket - AlwMVMO - 10-03-2020, 11:21 PM
RE: Macro for Sprocket - quarkqq - 10-05-2020, 11:13 AM
RE: Macro for Sprocket - AlwMVMO - 10-05-2020, 09:55 PM
RE: Macro for Sprocket - quarkqq - 10-06-2020, 12:00 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)