Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sheet.GetProperties question

Status
Not open for further replies.

ronin2307

Industrial
Mar 28, 2005
29
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
 
Replies continue below

Recommended for you

Ronin!,
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?
 
I wish it was that easy. If you keep this up your Jeep will have slashed tires :)
 
I am sure you probably checked but verify that all three are using the same version and service pack of SW.

Fill what's empty. Empty what's full. And scratch where it itches.
 
tried that. even reinstalled SW on that workstation :-(
 
I had a similar situation in which I use a macro to enter the approval names and dates into the title block without having to type them manually. I used a control in my form that was an added control to get the calender to pop up. It turned out the control I added was from Norton Anti Virus and one of the other users had a different version installed which did not contain the control. After updating that users Norton, the macro worked perfect.

Fill what's empty. Empty what's full. And scratch where it itches.
 
Did you think about de-installing the printer on that workstation. It might as well not be a problem of SW but some sort of conflict or bad-install of your printer.

Bouke Brouwers
Mechanical Engineer
SW2005 SP1.0
 
good idea "Bouke", remember Plug and play is sometimes plug and pray.....make sure all the printer software is setup correctly and correct drivers are used. Just because it can connect to the printer doesn't mean it's okay. Good luck.

John
 
printers have been reinstalled, SW as well, same SP...
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 :-(
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor