Bend counting macro fails for unknown reason

Bend counting macro fails for unknown reason

EricSchubert-Symetri
Advocate Advocate
908 Views
8 Replies
Message 1 of 9

Bend counting macro fails for unknown reason

EricSchubert-Symetri
Advocate
Advocate

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.

  1. Open the part 003-01.ipt
  2. Run the macro (it works)
  3. Edit the derive feature (right click 003-00.ipt, select “Edit Derived Part”)
  4. Deselect “Solid2” and select “Solid3”
  5. Run the macro (it does not work)
Accepted solutions (1)
909 Views
8 Replies
Replies (8)
Message 2 of 9

HermJan.Otterman
Advisor
Advisor

strange... looks like some kind of bug, why the bend is not listed in the bends.

 

what you could do is go through the featues,

 

if you look at the bend features, the both have non...!

 

in both parts there are two features

- face

- flange

 in both parts the flange feature has a bend

 

so to do a proper count, go through the features....

If this answers your question then please select "Accept as Solution"
Kudo's are also appreciated Smiley Wink

Succes on your project, and have a nice day

Herm Jan


0 Likes
Message 3 of 9

EricSchubert-Symetri
Advocate
Advocate

Thanks, Herm!

 

So, the "correct" way to count bends is to look at the features instead of trying to identify bends?  Or is this a workaround?

 

If it should work, then I'd prefer to have it logged as a bug for correction in an update or future release.

0 Likes
Message 4 of 9

HermJan.Otterman
Advisor
Advisor

to me it looks like a bug, and I would ask Autodesk Support for there vision on this.

I'm not sure what the bends should show, but the parts look the same and the bends is not so to me this is not something you can rely on. (for now)

so to get it working I would use the features because that looks consitant, and see it as a workaround... (but maybe it is the proper way) most important is that it works Smiley Happy

If this answers your question then please select "Accept as Solution"
Kudo's are also appreciated Smiley Wink

Succes on your project, and have a nice day

Herm Jan


0 Likes
Message 5 of 9

EricSchubert-Symetri
Advocate
Advocate

Funny you mention that...  I did submit this as a support case with Autodesk.  They told me customizations are only supported here, and I would need to post the issue in this forum.

 

Does anyone on the Autodesk team peruse this board?  I've not had to post in here before.

0 Likes
Message 6 of 9

HermJan.Otterman
Advisor
Advisor

that is strange?

 

do you have access to the Autodesk.Partner Center?

 

when you create a new case, under technical support there is a topic "API Support"

 

I believe it should be there...

If this answers your question then please select "Accept as Solution"
Kudo's are also appreciated Smiley Wink

Succes on your project, and have a nice day

Herm Jan


0 Likes
Message 7 of 9

MjDeck
Autodesk
Autodesk
Accepted solution

Hi Eric,
 Thanks for finding this problem. We're tracking it with internal number INVGEN-13806.


Mike Deck
Software Developer
Autodesk, Inc.

Message 8 of 9

EricSchubert-Symetri
Advocate
Advocate

Hi, Mike.  Thanks for putting this into the system.

 

Do you know if the workaround mentioned earlier would work for the time being?

0 Likes
Message 9 of 9

MjDeck
Autodesk
Autodesk

Herm Jan's workaround seems to be ok on a part without derived bodies, but so far I haven't been able to get it to work on your 003-01.ipt. I'll look at it in more detail.


Mike Deck
Software Developer
Autodesk, Inc.

0 Likes