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!

Search results for query: *

  1. CheeseMaker13

    Determine DoF for parts in a product or count fixes in a component node

    Well, Just as I posted that I cracked it - at-least partly. First I could the root fixes using: oSelection.Search "CATAsmSearch.MfFixConstraint.Name=Fix'.'*,oDocument" then search for the component node fixes using: oSelection.Add oProducts 'Select the component node. oSelection.Search...
  2. CheeseMaker13

    Determine DoF for parts in a product or count fixes in a component node

    Hi Guys, Is there a way of checking that each part in a component node is fixed? Currently I count all the fixes in the root of the document: oSelection.Search "CATAsmSearch.MfFixConstraint.Name=Fix'.'*,oDocument" then count ALL the fixes: oSelection.Search "CATAsmSearch.MfFixConstraint,all"...
  3. CheeseMaker13

    Fix problem with occasional broken links?

    The search orders are correct. So my machine points at Folder A, their machine points at Folder B, and the data from Folder A has been copied into Folder B, with no corruption.
  4. CheeseMaker13

    Fix problem with occasional broken links?

    Hi Guys, I keep coming up against a problem whereby when I send a product with the associated parts to another user, that on occasion the data will exhibit broken links even though the part file is there and loads absolutely fine on my machine (with a cleared cache or not). Is the...
  5. CheeseMaker13

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

    Hi MarcL68, My script for renaming instances works fine. It's adding the fixes again!!
  6. CheeseMaker13

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

    Thanks. That worked a treat. My code is now: Sub Test() Set oDocument = CATIA.ActiveDocument Set oProduct = oDocument.Product Set oProducts = oProduct.Products Set oSelection = oDocument.Selection Set oConstraints = oProduct.Connections("CATIAConstraints") Set...
  7. CheeseMaker13

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

    HI Guys, Pulling my hair out here, because whatever I do I cannot get instances within a component to rename. Essentially I have a product with a component at the end of the tree with loads more parts inserted in there. This code drills down to it and then renames them sequentially: Sub...
  8. CheeseMaker13

    Ending a 'StartCommand' command

    More accurate inertia calculations require more detailed data. Assuming the CofG is lumped into one point isn't as good as all the parts separated. I've reworked the code now so pausing is no longer needed. Essentially now I open up the top level product, search for each item in the...
  9. CheeseMaker13

    Search for an Instance name in a product

    Hi Guys. Thanks, both methods work!!
  10. CheeseMaker13

    Ending a 'StartCommand' command

    Hi mate, Thanks. Will get back to you and post some of the code (when it is working!!)
  11. CheeseMaker13

    Search for an Instance name in a product

    What would the full string be? oSelection.Search (Name='Apple.2' & ('Product Structure'.Product 'Assembly Design'.Product));all [That doesn't work :p] (I should have said I want to select the found item!!) Many Thanks!!!!!
  12. CheeseMaker13

    Search for an Instance name in a product

    Hi Guys, Another little problem I can't for the life of me figure out. I want to search for a specific Instance of something, for example "Apple.2". I have a SearchString Var with "Apple.2" in it. How do I then search for that in a product? I've tried: oSelection.Search...
  13. CheeseMaker13

    Ending a 'StartCommand' command

    Still getting the errors I'm afraid!!
  14. CheeseMaker13

    Ending a 'StartCommand' command

    Hi Lukasz, Thanks. This works in Alt+F11 yes? (The VBA edit window - not catscript?) Reason being I get an error on this: Public Sub ShellandWait(ByVal ProcessPath As String) Dim objProcess As System.Diagnostics.Process Try objProcess = New...
  15. CheeseMaker13

    Ending a 'StartCommand' command

    Hi Ferdo, Had considered that, but there are multiple instances of parts which only show their true CofG when in the Product. I've managed to find some code that closes the window for me: http://www.pbdr.com/vbtips/api/FindCloseAPI.htm ut the problem now is, even with DoEvents multiple...
  16. CheeseMaker13

    Ending a 'StartCommand' command

    Hi Guys, I'm currently writing a script to extract Inertial Data from a product of numerous parts. The problem I'm coming up against is that I need to run CATIA.StartCommand ("Measure Inertia") and once I've got all the data from the Parameters fields (E.g. "Gx =...
  17. CheeseMaker13

    Setting Viewer Background Color results in error

    Hi Guys, I have the following code: Dim objViewer3D As Viewer3D Dim objCamera3D As Camera3D Set MainDocument = CATIA.ActiveDocument Set objCamera3D = MainDocument.Cameras.Item(1) objViewer3D.Viewpoint3D = objCamera3D.Viewpoint3D Dim DBLBackArray(2) objViewer3D.GetBackgroundColor...
  18. CheeseMaker13

    Getting CofG of parts using different origin via VBA

    After having a crack at it i've managed to recreate the reference axis as "Created Axis" and managed to get the CofG calculation too using the following code: Dim MyMeasure Dim mycoord(2) Set ref1 = oPart.CreateReferenceFromObject(oPart.MainBody) Set MyWkBnch =...
  19. CheeseMaker13

    Getting CofG of parts using different origin via VBA

    HI Mate, I had a good search through the documentation and it doesn't seem to mention anything about automating the axis? I need to achieve two things: 1. Create an axis based on values that I need to extract from the new 'origin' axis. 2. Use this created axis to do my measurements of CofG...
  20. CheeseMaker13

    Checking if a StrParam exists?

    Hi Guys, Another one I can't work out! :( I have the 'address' (For Example: Part\Geometrical Set\Sub Geo Set\Name) for a parameter, for which then I get the value from using: Parameters.Item("Part\Geometrical Set\Sub Geo Set\Name").Value Now sometimes not all the parameters exist, so the...

Part and Inventory Search