I would like to add a area, a length and a width of a flat pattern to other Excel sheet. Now I see these dimensions from the drawing and I'm calculating a area of a flatpattern...
Could I be getting these values from Inventor easier way? I'm using iPart also. I think it help me if I would get values to Excel sheet for example.
Look into ilogic. Getting this information is really easy in Inventor and exporting it is just as easy. Look into it and if you have problem come back and I and others can give you some pointers.
There are also post on this subject do a search and you will find at least 20 post on it.
here is code to create properties for flat pattern length and width.
export them to excel...
partDoc=ThisDoc.Document
Try
DimsheetMetalDefAsSheetMetalComponentDefinition=partDoc.ComponentDefinitionIf(sheetMetalDef.HasFlatPattern())ThenDimpropertySetAsPropertySetpropertySet=partDoc.PropertySets.Item("{D5CDD505-2E9C-101B-9397-08002B2CF9AE}")DimlengthPropertyAs [Property] DimwidthPropertyAs [Property] ForEachcustomPropertyAs [Property] InpropertySetIfcustomProperty.Name.Equals("FlatExtendsLength")lengthProperty=customPropertyElseIfcustomProperty.Name.Equals("FlatExtendsWidth")widthProperty=customPropertyEndIfNextIflengthPropertyIsNothingThenpropertySet.Add("empty", "FlatExtendsLength")EndIfIfwidthPropertyIsNothingThenpropertySet.Add("empty", "FlatExtendsWidth")EndIfiProperties.Value("Custom", "FlatExtendsLength")=Round(SheetMetal.FlatExtentsLength,2)iProperties.Value("Custom", "FlatExtendsWidth")=Round(SheetMetal.FlatExtentsWidth,2)
EndIfCatch
EndTry
I hope it helps
Hi juha.lievonen,
Assuming you're not using an old version of Inventor you should be able to do this with a text note or sketched symbol, by accessing the Sheet Metal Properties as shown here. I think this functionality was added in Inventor 2009 or 2010. Getting the information to Excel will require the use of a custom iProperty as mentioned earlier.
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com