Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by ntweisen

  1. ntweisen

    PasteSpecial As Result CATVBA not working

    Here is the full code to show how the parts are selected by a user, added to a collection, then hopefully copied and pasted into a newly created product. 'filter what to select Dim filter(0) filter(0) = "Part" 'select the parts Dim theOldPart As String Dim partSelection Set...
  2. ntweisen

    PasteSpecial As Result CATVBA not working

    This was only a snippet of the code but basically I have the user select some data and add it to a collection, then the user could select more data and is added to the collection. Then the collection is copied and pasted into the new product. http://excelspreadsheetshelp.blogspot.com -...
  3. ntweisen

    PasteSpecial As Result CATVBA not working

    Has anyone had any issues with "CATPrtResultWithOutLink" to paste "AsResult" not working? I'm trying to paste a product into a newly created product but nothing gets pasted in. Using "CATPrtCont" to paste "As Specified In Part Document" results in an error. here is a quick example code: Dim...
  4. ntweisen

    CATIA VBA: Increase JOIN speed

    Yes, I need all edges including internal edges. I tried deleting the JOIN step as you suggested and it does help some. The search for edges step (selection1.Search "Topology.CGMEdge,sel") is usually pretty quick, less than 15 seconds. Just adding up the length of the edges using Measurable...
  5. ntweisen

    CATIA VBA: Increase JOIN speed

    Sorry, I should have listed out all the steps to make the purpose of the program more clear. Here are the steps: 1. Run the program 2. User selects a Join surface in the CATPart 3. Macro searches for all edges of the selected surface and selects them (1000 edges takes around 20 seconds to...
  6. ntweisen

    CATIA VBA: Increase JOIN speed

    Hello. I've created a CATVBA program that finds all the edges of a surface and then joins them together. The problem is if there are 700 edges (a medium sized part) then it takes 5 - 10 minutes for the macro to run as it adds all the edges one by one. Is there any way to increase the speed so it...
  7. ntweisen

    How to Hide Annotations Under a View?

    I never got Sendkeys to work with CATScript but I did get this to work in VBA: CATIA.RefreshDisplay = True AppActivate "CATIA V5" SendKeys "c:Activate" + Chr(13), True Application.Wait Now + TimeValue("00:00:05") The weird thing is it only activates the selected feature when I run the program...
  8. ntweisen

    How to Hide Annotations Under a View?

    So just a few days ago I could type c:Activate into the power input box and it would activate the selected geometry but for some reason that is not working anymore. Any idea why it suddenly stopped working? I never got send keys to work in my code either.
  9. ntweisen

    How to Hide Annotations Under a View?

    When I manually select a capture then type c:Activate into the input box it successfully activates the Capture and I can also type c:Exit fhe Capture to exit it too. However, I can't get this to work in a macro. Here's an example of something I tried: Dim sSel As Selection Set...
  10. ntweisen

    How to Hide Annotations Under a View?

    Thanks Ferdo! I adapted to my code and that part works perfectly. My final question is how do you edit an existing Capture? Typically I would double-click a capture, hide or show the annotations under the views as needed, then click "Exit from capture" (like you're exiting a sketch) and it will...
  11. ntweisen

    How to Hide Annotations Under a View?

    Thanks for the reply Ferdo but how do you search in FTA workbench for Functional Tolerancing & Annotation Element? I'm not quite sure what you mean. http://excelspreadsheetshelp.blogspot.com - http://scripting4v5.com
  12. ntweisen

    How to Hide Annotations Under a View?

    Hello. I'm trying to hide/unhide annotations under a specific View in a CATPart. I can count the total number of views but am not able to change a View's name. I can find the specific View using Search but am not sure if there is a way to access the annotations listed under that view. Attached...
  13. ntweisen

    Need help in scripting for selection of Points in specific Geo Set

    Select the geo set first then run the macro with this: selection1.Search "Name=Point'.'*,sel" http://excelspreadsheetshelp.blogspot.com - http://scripting4v5.com
  14. ntweisen

    What am I doing wrong here!?! (Renaming instances)

    Try adding ReferenceProduct: Set oDocument = CATIA.ActiveDocument Set oProduct = oDocument.Product Set oProducts = oProduct.Products Set product2 = oProducts.Item(2).Referenceproduct MsgBox product2.Name product2.PartNumber = "rename test" Add something like this to your loop: Set...
  15. ntweisen

    Excel

    Define the numeric value by adding these before the other code: Const xlCenter = -4108 Const xlBottom = -4107 http://excelspreadsheetshelp.blogspot.com - http://scripting4v5.com

Part and Inventory Search