×
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!

*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

Catalog Browser through VBA

Catalog Browser through VBA

Catalog Browser through VBA

(OP)
Hello All,
I am new to catia programming. I have to find out the angled view and place a symbol from the catalog. In the code what i have written it is giving the msgbox before it opens the catalog browser. If I keep break point it is working fine. Within that fraction of time it is not able to open the catalog before the msgbox. I am pasting the code below. Any help is appreciated.

For Each view1 In views1
If InStr(view1.name, "Main View") = 0 And InStr(view1.name, "Background View") = 0 Then
If view1.Angle <> 0 Then
Dim angleValue As Double
angleValue = view1.Angle * 180 / pi

view1.Activate

MsgBox "Please select the location in " + view1.name
status = doc1.Indicate2D("Indicate Text Location", TextLocation)

Dim angletext As DrawingText


If angleValue > 0 Then
Set angletext = view1.Texts.Add(CStr(angleValue), TextLocation(0), TextLocation(1))
MsgBox "Please select the STRAITENED VIEW1 symbol from catalog for the view " + view1.name
CATIA.StartCommand ("Catalog Browser")
ElseIf angleValue < 0 Then
Set angletext = view1.Texts.Add(CStr(angleValue * -1), TextLocation(0), TextLocation(1))
MsgBox "Please select the STRAITENED VIEW2 symbol from catalog for the view " + view1.name
CATIA.StartCommand ("Catalog Browser")
End If
End If
End If


Thanks
Sri

RE: Catalog Browser through VBA

(OP)
Thank you ferdo
I have tried sleep, loop, wait... In all the cases application is going to sleep in the sense user can not perform any operation in that time.

Thanks
Sri

RE: Catalog Browser through VBA

(OP)
Sorry, I am not sure what is modal form. Can you please explain. I have done it in catvba project.

Thanks
Sri

RE: Catalog Browser through VBA

(OP)
Hi,
If I am not using form and using only module then what to be done.

Thanks
Sri

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! Already a Member? Login


Resources

eBook - The Future of Product Development is Here
Looking to make the design and manufacturing of your products more agile? For engineering and manufacturing organizations, the need for digital transformation of product development processes just became more urgent than ever so we wanted to share an eBook that will help you build a practical roadmap for your journey. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close