Forum Replies Created

Viewing 15 posts - 16 through 30 (of 54 total)
  • Author
    Posts
  • in reply to: Measurebetween Parameter #1984

    Emmett Ross
    Keymaster

    Hi Dinesh,

    Do you mean use parameters to measure distance between two objects? Is so, check out this article: http://www.scripting4v5.com/additional-articles/how-to-measure-distance-between-two-points-catia-macro/

    in reply to: Run a CATscript from VB #1583

    Emmett Ross
    Keymaster

    Hi. These codes might give you an idea of how to do it:

    vbs launcher
    Language=”VBSCRIPT”
    Sub CATMain()
    call CATIA.SystemService.ExecuteBackGroundProcessus(“WScript.exe c:\CATScripts\read_user_environment.vbs”)
    End Sub

    ‘how to call one catscript from another
    Sub CATMain()
    Dim EmptyPar()
    Dim ScPath
    ScPath = “D:\tmp”
    MsgBox “Save Operation will be executed on the active document!”
    CATIA.SystemService.ExecuteScript scpath, catScriptLibraryTypeDirectory, “Save.CATScript”, “CATMain”, EmptyPar
    End Sub

    in reply to: CATPart search macro #1580

    Emmett Ross
    Keymaster

    Hi. Are you trying to search for just the CATParts or search just within CATparts?

    Selection1.Search “CATPrtSearch.Surface, All”

    in reply to: Create Coordinate Dimension with text #1572

    Emmett Ross
    Keymaster

    Hi Niklas. The first step is to choose a point or multiple points – how do you want to accomplish that? By user selection before the macro is started, by user selection while the macro is running, or automatically with macro searching for points by name or type?

    in reply to: 2d drawing associated texts #1571

    Emmett Ross
    Keymaster

    Hi Cimonc. You should be able to automate your process. I would begin by working through each of the steps you listed individually then combine it all together. For #1, see the unlock drawing view macro on my downloads page: http://www.scripting4v5.com/downloads/
    Let me know if you get stuck! Good luck.

    in reply to: Hou to deal with the parameters lihe this #1570

    Emmett Ross
    Keymaster

    Hi. This measurement macro will show you how to deal with parameters: http://www.scripting4v5.com/additional-articles/how-to-measure-distance-between-two-points-catia-macro/
    If you’re trying to do something specific and are having a problem please let me know.

    in reply to: Macro for closing a document automatically on License error #1569

    Emmett Ross
    Keymaster

    Hi. Can you explain more? Have you tried writing any code yourself? What license error? Closing a document is easy.

    in reply to: SendKeys to popup window #1559

    Emmett Ross
    Keymaster

    Hi. Do you have to use Send Keys? I’ve found they are quite unreliable.

    in reply to: Introduce Yourself #1558

    Emmett Ross
    Keymaster

    Hi Alex! Thanks for joining the forum. Glad to see you’re working in automotive industry.

    in reply to: Catia server installation and VBA #1557

    Emmett Ross
    Keymaster

    Hi there. So while in CATIA, if you press alt+f8 the macro window comes up but if you press alt+f11 you get the above posted error message?

    in reply to: Exporting data to Excel #1547

    Emmett Ross
    Keymaster

    So you’ve tried this exact code and nothing happens:

    If you use the code above, do you get the text in cell A1 but nothing in cell C1?

    in reply to: 2d drawing associated texts #1545

    Emmett Ross
    Keymaster

    Hi Antonello, to get started see the following macro to loop through all dimension texts:

    in reply to: Distance between two points #1537

    Emmett Ross
    Keymaster
    in reply to: Distance between two points #1521

    Emmett Ross
    Keymaster

    Yes, you can modify to code to measure between a point and a plane.Edit this line:

    Set formula1 = relations1.CreateFormula(“Formula.2”, “”, length1, “distance(‘Geometrical Set.1\MyEndPt1′ ,’Geometrical Set.1\MyEndPt2’) “)

    in reply to: Distance between two points #1518

    Emmett Ross
    Keymaster

    HI. Sorry for the confusion, I will have to clean up that section of the book in the next version.Please see the code below. The attached picture also shows how it should look. Try it and let me know.

Viewing 15 posts - 16 through 30 (of 54 total)