×
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

Catia V5 windows arrangement

Catia V5 windows arrangement

Catia V5 windows arrangement

(OP)
Hello to all,

When I run code to cursor everything works well (Catia windows arranged vertically).
But when I run the same code in auto mode nothing happens (no arrangement).

CODE --> vb.net

Dim Part As Document
        Part = myCatia.Documents.Open("xxxxxxxxxxxxxxxx.CATPart")
        Part = myCatia.ActiveDocument

        '----Arrange Catia V5 windows----
        Dim CatiaWindows As Windows
        CatiaWindows = myCatia.Windows
        CatiaWindows.Arrange(CatArrangeStyle.catArrangeTiledVertical)

        '----Feature select and copy----
        Dim MySelection As Selection
        MySelection = myCatia.ActiveDocument.Selection
        MySelection.Search("CATStFreeStyleSearch.GSM3DCurveOffset + CATGmoSearch.GSM3DCurveOffset,all")
        myCatia.StartCommand("copy") 

I just want to open file, copy named feature and past it into another CATPart using SelectElement2.
I dont want to switch between windows that is why I want to use arrangement.

Any help will be greatly appresiated,

Jenia Ladkov.

RE: Catia V5 windows arrangement

what you are saying is that the windows don't become arranged?

CODE --> vb.net

'----Arrange Catia V5 windows----
        Dim CatiaWindows As Windows
        CatiaWindows = myCatia.Windows
        CatiaWindows.Arrange(CatArrangeStyle.catArrangeTiledVertical) 

With me is working fine.

Tiago Figueiredo
Tooling Engineer

RE: Catia V5 windows arrangement

(OP)
Works fine if I run code line by line (F11).
In auto mode I get following


Only works for me if I move code after message box right before selection

CODE --> vb.net

MsgBox("Select Geometrical set where copied element will be inserted.", vbOKOnly, "Features to copy")
        Dim CatiaWindows As Windows
        CatiaWindows = myCatia.Windows
        CatiaWindows.Arrange(CatArrangeStyle.catArrangeTiledVertical)
        status = PasteSel.SelectElement2(ObjectFilter, "Select Geometrical set...", False)
        myCatia.StartCommand("paste") 

RE: Catia V5 windows arrangement

Do you really need that message box? Don't forget that you a message on the status bar provided SelectElement2.

Probably Catia don't have time to arrange the windows before message box.


you can try the following if you really want that message:

CODE --> vb.net

Dim CatiaWindows As Windows
        CatiaWindows = myCatia.Windows
        CatiaWindows.Arrange(CatArrangeStyle.catArrangeTiledVertical)
        status = PasteSel.SelectElement2(ObjectFilter, "Select Geometrical set...", False)
        myCatia.StartCommand("paste")
myCatia.RefreshDisplay = True
MsgBox("Select Geometrical set where copied element will be inserted.", vbOKOnly, "Features to copy") 

Tiago Figueiredo
Tooling Engineer

RE: Catia V5 windows arrangement

(OP)
Tiago thanks for the suggestion. I don't need any messages in my applications because I know exactly how it works. When it comes to users it's like what the heck do I have to do. That is why I add images, explanations or whatever during program run.

RE: Catia V5 windows arrangement

Amazing. By the way, really nice interface

Tiago Figueiredo
Tooling Engineer

RE: Catia V5 windows arrangement

(OP)
Completely switched to WPF.

RE: Catia V5 windows arrangement

I need to learn it.

Tiago Figueiredo
Tooling Engineer

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