×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Sheet.GetProperties question

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

RE: Sheet.GetProperties question

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?

RE: Sheet.GetProperties question

(OP)
I wish it was that easy. If you keep this up your Jeep will have slashed tires

RE: Sheet.GetProperties question

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.

RE: Sheet.GetProperties question

(OP)
tried that. even reinstalled SW on that workstation :-(

RE: Sheet.GetProperties question

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.

RE: Sheet.GetProperties question

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

RE: Sheet.GetProperties question

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

RE: Sheet.GetProperties question

(OP)
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 :-(

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources