Custom Part Number to include flat pattern extents

Custom Part Number to include flat pattern extents

Shag_Bore
Advocate Advocate
705 Views
6 Replies
Message 1 of 7

Custom Part Number to include flat pattern extents

Shag_Bore
Advocate
Advocate

Hello,

I started a thread in the other forum but I think I may need assistance with this using iLogic. 

I have a content center sheet metal part that is placed into an assembly. I set the base length and width upon placing, then add flanges and such after placing. I have an iLogic rule to run before saving which populates the extents_length and extents_width parameters on a part level. These parameters are exported after creation into custom iProperties. 

 

I can get an individual part to display the updated part number which is the product identifier along with the 2 custom iProperties (flat pattern) on a drawing parts lists. I manually manipulated this in the iProperties Part Number section by inputting = <Cost Center> - LENGTH <EXTENTS_LENGTH> - WIDTH <EXTENTS_WIDTH>
(I manually filled the part identifier in the Cost Center field as it was an empty slot)

 

flatpattern10.PNG

 

I want this to happen on an assembly level because I want to group all the same parts that have the same part numbers (flat pattern) using the BOM Part Number Merge Setting. 

 

When trying to implement this Part Number call out, it is pulling the "full sheet flat pattern" of sheet metal extents that is found in the original file used to publish the iPart to Content Center. 

 

In the assembly the parts that I create, the true extents properties exist but the parts list is using the Family Table to implement the part number, which refers to the extents prior to creating in the assembly. 

flatpattern11.PNG

 

Would there be a rule that could "pull" the extents values from the sheet metal components so that I could implement the Part Number that I am trying to achieve.

 

My end goal if not clear, so when creating a Parts List of the assembly, I want to group together all the components that use the same stock sheet metal product, but split them up based on their flat pattern. Currently the all my sheet metal parts are grouped into one item with a random qty number. 

 

I want to be able to reproduce what I did on a part level inside an assembly without having to manually do it for each part.

 

Any Autodesk Pro's out there that can help?

 

Thanks!

 

Sean

 

Sean Farr
Product Designer at Teksign Inc.
Inventor 2016 SP1
Dell Precision 3660
i7-12700 @ 2.40GHz-4.90GHz
32GB DDR5 4400MHz RAM
NIVDIA RTX A2000 6GB
0 Likes
Accepted solutions (1)
706 Views
6 Replies
Replies (6)
Message 2 of 7

A.Acheson
Mentor
Mentor

Here is a quick method to concatenate the custom iprops to the part number in every document  in the assembly. Are the flatpattern size subject to change? If so you can call flatpattern extents by code and get up to date values. 

Helpful Articles 

Traversing Assembly

iProperties

Sub Main
' Get the active assembly. Dim oAsmDoc As AssemblyDocument = ThisApplication.ActiveDocument ' Get all of the referenced documents. Dim oRefDocs As DocumentsEnumerator = oAsmDoc.AllReferencedDocuments ' Iterate through the list of documents. Dim oRefDoc As Document For Each oRefDoc In oRefDocs
'Check for sheetmetal Parts Only If oRefDoc.SubType = "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" Then
iProps(oRefDoc)
End If Next End Sub Sub
iProps(oDoc As Document) 'Gain Access to properties using API Property Sets 'Dim DesignProp As PropertySet = oDoc.PropertySets.Item("Design Tracking Properties") Dim oPn As [Property] = DesignProp.Item("Part Number") 'Dim oDesc As [Property] = DesignProp.Item("Description") 'Dim oVen As [Property] = DesignProp.Item("Vendor") 'Dim oAut As [Property] = DesignProp.Item("Authority") 'Dim oStat As [Property] = DesignProp.Item("User Status") 'Dim SumProp As PropertySet = oDoc.PropertySets.Item("Inventor Summary Information") 'Dim oCom As [Property] = SumProp.Item("Comments") 'Dim oSub As [Property] = SumProp.Item("Subject") Dim CustomProp As PropertySet = oDoc.PropertySets.Item("Inventor User Defined Properties")
Try Dim oExtLength As String = CustomProp.Item("EXTENTS_LENGTH").Value Dim oExtWidth As String = CustomProp.Item("EXTENTS_WIDTH").Value
Catch End Try Try oPn.Value = "LENGTH - " & oExtLength & " - WIDTH " oExtWidth Catch End Try End Sub

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes
Message 3 of 7

Shag_Bore
Advocate
Advocate

Hey @A.Acheson!

I was thinking about this lots last night after work, I am wondering if it would be best to run this rule at the part level. So that it only applies to this one particular Sheet Metal part from the Content Center and not the entire assembly. For my other parts that I want to groups together, I just use the G_L parameter and Product Identifier. Sheet metal is the tricky one since it requires a flat pattern sometimes. Also if I do have to make changes to a part, it should update the custom iProps and Part Number after running the iLogic rule?

Currently I have the rule to run and create parameters for the extents, then create them as custom iProps. This rule is saved to the sheet metal part before being published to the Content Center. So that each part that I create from that content center "sheet metal" part has the custom iProps created upon saving the document.

 

I think I can create a rule using what you posted so that when creating a new sheet metal part and saving:

step 1-create extents parameters

step 2-transfer those parameters into custom iProps

step 3- concatenate the Part Number to read  <Cost Center> - Length <extents_length> - Width <extents_width>

 

Thanks for the help!!

 

 

Sean Farr
Product Designer at Teksign Inc.
Inventor 2016 SP1
Dell Precision 3660
i7-12700 @ 2.40GHz-4.90GHz
32GB DDR5 4400MHz RAM
NIVDIA RTX A2000 6GB
0 Likes
Message 4 of 7

Shag_Bore
Advocate
Advocate

So close! 99% there, I applied this rule to the sheet metal iPart before publishing and it works. 

iProperties.Value("Project", "Part Number") = iProperties.Value("Project", "Cost Center")&" - LENGTH " & CStr(EXTENTS_LENGTH) & " - WIDTH " & CStr(EXTENTS_WIDTH)

 

The only issue is the rule is overriding the parameter precision settings. It is displaying full value, see image:

flatpattern14.PNG

 

The rule even updates the extents values if I do have to make a change in the assembly. My vba is quite weak. Can someone help me, if it is possible to convert the extents values to fractions to a precision of 1/16", if not then how to round down to the nearest .001.

 

Thanks,

 

 

Sean Farr
Product Designer at Teksign Inc.
Inventor 2016 SP1
Dell Precision 3660
i7-12700 @ 2.40GHz-4.90GHz
32GB DDR5 4400MHz RAM
NIVDIA RTX A2000 6GB
0 Likes
Message 5 of 7

A.Acheson
Mentor
Mentor

 Slight correction it looks like your using the ilogic environment which uses the VB.NET language and not VBA. 

Use the function “Round”

 

Round(EnterYourValue,3)

 Can you just place the formula directly in the part number iproperty before you publish? This way it will always update. No ilogic needed. 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
Message 6 of 7

Shag_Bore
Advocate
Advocate

A previous post here help me figure out how to convert to fraction and round up. Thanks! @Anonymous 

Got what I am looking for, unless there is something that may be troublesome down the road. I can Merge my parts by Product Identifier and sizes. 

 

flatpattern15.PNG

 

The rules can be found in the attached part file.

 

Cheers all! It's Friday!

 

Sean

Sean Farr
Product Designer at Teksign Inc.
Inventor 2016 SP1
Dell Precision 3660
i7-12700 @ 2.40GHz-4.90GHz
32GB DDR5 4400MHz RAM
NIVDIA RTX A2000 6GB
0 Likes
Message 7 of 7

A.Acheson
Mentor
Mentor
Accepted solution

Here is a post describing how to directly get the sheet metal length and width into the iproperties without ilogic and in the document units.

    = <SHEET METAL LENGTH> & <SHEET METAL WIDTH>

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan