Sheet.GetProperties question
Sheet.GetProperties question
(OP)
Hi,
this is not neccessarily a programming question, but rather a "I'm completely confused" question
In a nutshell:
using VB I open up a drawing, I get the current sheet and then get it's properties.
I use the properties to determine the paper size of the drawing
'here I get the paper size info
sheet = swDraw.GetCurrentSheet
retval = sheet.GetProperties
'strSheetName = sheet.GetName
arrDbl = retval
'Write a function here that will send the drawing size as a parameter so that I can set up the printer
If arrDbl(0) = PaperSize.A Or arrDbl(0) = PaperSize.B Then
PrinterSetup(swModel, ps, arrDbl(0))
ElseIf arrDbl(0) = PaperSize.C Or arrDbl(0) = PaperSize.D Then
PrinterSetup(swModel, ps, PaperSize.B)
PrinterSetup(swModel, ps, arrDbl(0))
End If
This works seems to work great on 3 different workstations but on a 4th one I have an unexplainable result.
I open up a D size drawing and Sheet.Getproperties returns that it is a B size.
I have no idea why. I have debugged the code to the point that I am confident it is correct. RIght now I am assuming it is something in the SW option that is set up weirdly, but no success yet.
ANY idea will be appreciated
Thanx
this is not neccessarily a programming question, but rather a "I'm completely confused" question
In a nutshell:
using VB I open up a drawing, I get the current sheet and then get it's properties.
I use the properties to determine the paper size of the drawing
'here I get the paper size info
sheet = swDraw.GetCurrentSheet
retval = sheet.GetProperties
'strSheetName = sheet.GetName
arrDbl = retval
'Write a function here that will send the drawing size as a parameter so that I can set up the printer
If arrDbl(0) = PaperSize.A Or arrDbl(0) = PaperSize.B Then
PrinterSetup(swModel, ps, arrDbl(0))
ElseIf arrDbl(0) = PaperSize.C Or arrDbl(0) = PaperSize.D Then
PrinterSetup(swModel, ps, PaperSize.B)
PrinterSetup(swModel, ps, arrDbl(0))
End If
This works seems to work great on 3 different workstations but on a 4th one I have an unexplainable result.
I open up a D size drawing and Sheet.Getproperties returns that it is a B size.
I have no idea why. I have debugged the code to the point that I am confident it is correct. RIght now I am assuming it is something in the SW option that is set up weirdly, but no success yet.
ANY idea will be appreciated
Thanx






RE: Sheet.GetProperties question
You really seem to have covered all your bases. Is there a chance that the workstation you are having problems with is cursed because of its previous owner?
RE: Sheet.GetProperties question
RE: Sheet.GetProperties question
Fill what's empty. Empty what's full. And scratch where it itches.
RE: Sheet.GetProperties question
RE: Sheet.GetProperties question
Fill what's empty. Empty what's full. And scratch where it itches.
RE: Sheet.GetProperties question
Bouke Brouwers
Mechanical Engineer
SW2005 SP1.0
RE: Sheet.GetProperties question
John
RE: Sheet.GetProperties question
I think I am just going to wipe the damn machine anyway and call it good. I tried my app on 4 different computers and it works on all except this one stupid machine :-(