×
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

Titleblock macro stopped working when upgrading from V5R20 to R21

Titleblock macro stopped working when upgrading from V5R20 to R21

Titleblock macro stopped working when upgrading from V5R20 to R21

(OP)
Hi there,

I'm completely new in this forum, so I hope I'm providing the sufficient information level.

I'm a pretty experienced Danish (which explains the lack of English skills) Catia V5 user. When I'm doing 2D drawings I have a macro that I can run directly from a part which allows me to choose between a predefined number of paper sizes and the macro then create the paper size with parametric title block ect.. Everything worked perfect in R18-R19 and R20, but when R21 was installed the problems started. I know that some of the VBA software changed when R21 is installed, forcing the R20 to run the "new" VBA making the macro stopped working in R20, but the IT-department just fixed this issue. So the R20 runs the old, and R21-R22-R23 runs the new version.

So now I'm running R20 on my computer where the macro works perfectly, but when I open R21-R22-R23 the macro will not work. It’s the same macro, all the documents needed is placed in same folder and so on.

When I run the macro in R23 (I’m currently not using R21 and R22) it starts of by letting me chose the paper size but then it says "Document cannot be read" allowing me to press "ok".
When it gives me a information box saying Run-time error '91': Object variable or With block variable not set.

Then I can do the "debug" where it finds an error in this line " Set DetailSheets = DetailDoc.Sheets " - Again this macro is working in R20, does anyone know what has changed in R23 making the macro producing this error?

I hope my question is understandable.

I'm not allowed to copy paste the whole macro onto this forum, so I know it might be difficult to give me any specific help, but maybe somebody can give me some information on the general changes from R20 to the new revisions which will allow me to fix the macro my self.

Thanks in advance,

Kind regards
Daniel :)

RE: Titleblock macro stopped working when upgrading from V5R20 to R21

and online help too.

RE: Titleblock macro stopped working when upgrading from V5R20 to R21

It sounds like it may not know what DetailDoc is when you "Set DetailSheets = DetailDoc.Sheets"...like it did not set DetailDoc previously. You can put a message box before this line to check it. Assuming DetailDoc is set to a document, put "msgbox DetailDoc.Name" before the line with the error. If the messagebox is empty or errors (because there is no DetailDoc.Name), check where you are setting DetailDoc.

RE: Titleblock macro stopped working when upgrading from V5R20 to R21

(OP)
Hi guys,

Thanks for the respons, it turned out that it was a stupid setup problem, the IT department missed a \ in out base-dir giving the macro a hard time finding what it was looking for..

agian thanks alot!

/Daniel

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