- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Our customer is looking for assistance with understanding why their simple macro to count sheet metal bends on a part fails sometimes, but not other times.
Attached are example files for each scenario below. The first to demonstrate a simple pair of parts, one sick and one healthy. One fails the macro, the other passes. We have no idea why. They're simple parts with only one bend, identical to each other. The last set of instructions seems to replicate this issue through a derived model, causing a working model to fail after editing the derive to use a different solid.
Here are steps to identify and reproduce the issue. Any assistance would be appreciated.
PROBLEM
API: SheetMetalComponent.Bends fails in some cases.
DESIRED BEHAVIOR
SheetMetalComponent.Bends should not fail.
STEPS TO REPLICATE
Note: Bends property shows incorrect behavior for steps 1-4, correct behavior for steps 5-8.
Problem behavior:
1. Open Unhealthy_2018-02-21.ipt.
2. Open VBA Editor (Alt+F11) and open the module "Module1" in the document project.
3. Run the macro "GetBends".
4. Note that macro fails with the following error: "Run-time error '-2147467259 (80004005))': Method 'Bends' of object 'SheetMetalComponentDefinition' failed"
Correct behavior:
5. Open Healthy_2018-02-21.ipt.
6. Open VBA Editor (Alt+F11) and open the module "Module1" in the document project.
7. Run the macro "GetBends".
8. Note that macro gives correct result (A message box that reports bend count of 1).
We believe that that a way has been found to replicate this issue, at least in some form.
- Open the part 003-01.ipt
- Run the macro (it works)
- Edit the derive feature (right click 003-00.ipt, select “Edit Derived Part”)
- Deselect “Solid2” and select “Solid3”
- Run the macro (it does not work)
Solved! Go to Solution.