Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Sheet metal/flat pattern properties: Flat Pattern Length vs. Sheet Metal Length

1 REPLY 1
SOLVED
Reply
Message 1 of 2
alewer
828 Views, 1 Reply

Sheet metal/flat pattern properties: Flat Pattern Length vs. Sheet Metal Length

In the process of migrating an addin from 2010 to 2013, I've encountered some unusual behavior. Among other things, my addin reports the flat length and width of a sheet metal part. The problem:

 

In 2010: For sheet metal parts, PartDocument.PropertySets.Item("Design Tracking Properties").Item("Sheet Metal Length").Value.ToString has always returned a string as expected (e.g. "26.065 in").

 

In 2013: For sheet metal parts, PartDocument.PropertySets.Item("Design Tracking Properties").Item("Sheet Metal Length").Value.ToString sometimes returns a string as expected (e.g. "26.065 in"), and sometimes returns area (e.g. "306.409 in^2") instead.

 

As I dig into the parts in question, it looks like another property is behaving consistently: PartDocument.PropertySets.Item("Design Tracking Properties").Item("Flat Pattern Length").Value seems to be reliably returning a double of correct value (in internal units--cm).

 

Besides returning different types, is there a difference by design between these two properties (Flat Pattern Length and Sheet Metal Length)? Is one recommended? Does anyone know what's causing my error? If it helps, I can attach a file.

1 REPLY 1
Message 2 of 2
alewer
in reply to: alewer

I checked Brian Ekins' SheetMetalExtents Addin, which uses FlatPattern.Length and .Width instead. Brian hasn't yet led me astray, so I'll follow this example.

 

If someone at AD wants to see the behavior described, I've attached a sheet metal part with a VBA document project and a screenshot.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report