Hi
Is it possible to have the occurrence name of part in assembly as a property in the parts list?
Suppose I have many occurrences of the same part, but with different occurrence names. I want to balloon them in idw with this property and also to have them separated in the parts list...
Any ideas?
Regards
Solved! Go to Solution.
Hi
Is it possible to have the occurrence name of part in assembly as a property in the parts list?
Suppose I have many occurrences of the same part, but with different occurrence names. I want to balloon them in idw with this property and also to have them separated in the parts list...
Any ideas?
Regards
Solved! Go to Solution.
Solved by dhaval3112. Go to Solution.
Why? What are you trying to accomplish by showing that?
The occurrence name is simply the part number plus a number representing the number of occurrences in the assembly.
I can't think of a good reason to want that in a parts list ever.
Part1:1 and Part1:2 should be the EXACT same parts an as such the should be 100% interchangable.
Why? What are you trying to accomplish by showing that?
The occurrence name is simply the part number plus a number representing the number of occurrences in the assembly.
I can't think of a good reason to want that in a parts list ever.
Part1:1 and Part1:2 should be the EXACT same parts an as such the should be 100% interchangable.
I can answer your question as to why this is being requested (at least in our context). I'm attempting to program within VBA and ilogic to assign an "Assembly Number" to every part in our assemblies. This is simply a sequential number for each part that is used by our installers to identify each part uniquely. Yes, there are a multitude of identical parts but when the customer calls and says a particular part is not working we can both refer to the 2D file and they can tell us its "P-18" that has the issue.
So, I'm hoping to program a routine that will generate and place this assembly number in the Factory_Descriptor field for each part and that will cause it to appear in the .DWG file when we sync with AutoCAD (Yes, we're using FDS).
Any help for the OP and myself would be greatly appreciated.
I can answer your question as to why this is being requested (at least in our context). I'm attempting to program within VBA and ilogic to assign an "Assembly Number" to every part in our assemblies. This is simply a sequential number for each part that is used by our installers to identify each part uniquely. Yes, there are a multitude of identical parts but when the customer calls and says a particular part is not working we can both refer to the 2D file and they can tell us its "P-18" that has the issue.
So, I'm hoping to program a routine that will generate and place this assembly number in the Factory_Descriptor field for each part and that will cause it to appear in the .DWG file when we sync with AutoCAD (Yes, we're using FDS).
Any help for the OP and myself would be greatly appreciated.
Hi! This is an interesting request. I have to admit it is new to me. Let me explain how it works in Inventor. The occurrence name is only meaningful within the assembly where the occurrence exists. It is sort of a unique ID for a component within an assembly. The actual component document (ipt or iam) does not know anything about the occurrence. It simlpy provides the definition for the occurrence. As a result, there is no document-level property tracking all the occurrence names.
To do fulfill your request, you might need to make copies of component document, instead of using occurrences. Then make sure all these components share the same Part Number so that don't appear as unique component in BOM table.
Thanks!
Hi! This is an interesting request. I have to admit it is new to me. Let me explain how it works in Inventor. The occurrence name is only meaningful within the assembly where the occurrence exists. It is sort of a unique ID for a component within an assembly. The actual component document (ipt or iam) does not know anything about the occurrence. It simlpy provides the definition for the occurrence. As a result, there is no document-level property tracking all the occurrence names.
To do fulfill your request, you might need to make copies of component document, instead of using occurrences. Then make sure all these components share the same Part Number so that don't appear as unique component in BOM table.
Thanks!
Ancient history here, but if my fading memory serves, Pro Engineer had the ability for a user to add an attribute or property (or whatever they called it), at the assembly instance level. This could then be pulled off in drawing documentation. We used it in our piping systems, to put the individual valve tag number on multiple instances of the same valve block (part or assembly as the case may be).
This might be a good one to add to the Idea Station for future consideration.
Chris Benner
Inventor Tube & Pipe, Vault Professional
Cad Tips Tricks & Workarounds | Twitter | LinkedIn
Autodesk University Classes:
Going With The Flow with Inventor Tube and Pipe | Increasing The Volume with Inventor Tube and Pipe | Power of the Autodesk Community | Getting to Know You | Inventor Styles & Standards |Managing Properties with Vault Professional | Vault Configuration | Vault - What is it & Why Do I Need It? | A Little Less Talk - Tube & Pipe Demo | Change Orders & Revisions - Vault, Inventor & AutoCAD | Authoring & Publishing Custom Content
Ancient history here, but if my fading memory serves, Pro Engineer had the ability for a user to add an attribute or property (or whatever they called it), at the assembly instance level. This could then be pulled off in drawing documentation. We used it in our piping systems, to put the individual valve tag number on multiple instances of the same valve block (part or assembly as the case may be).
This might be a good one to add to the Idea Station for future consideration.
Chris Benner
Inventor Tube & Pipe, Vault Professional
Cad Tips Tricks & Workarounds | Twitter | LinkedIn
Autodesk University Classes:
Going With The Flow with Inventor Tube and Pipe | Increasing The Volume with Inventor Tube and Pipe | Power of the Autodesk Community | Getting to Know You | Inventor Styles & Standards |Managing Properties with Vault Professional | Vault Configuration | Vault - What is it & Why Do I Need It? | A Little Less Talk - Tube & Pipe Demo | Change Orders & Revisions - Vault, Inventor & AutoCAD | Authoring & Publishing Custom Content
Thank you guys...yes I'm aware of how the occurrences 'work' which is why I was hoping for a slick work-around. Its trivial to get a 'custom' BOM listing exported that lists every part individually with whatever unique identifier I wish. The trick I'm looking for is to populate that same identifier on the 2D file as it comes out of Inventor. Replicating the part files or notating them manually is not practical since our layouts (we're a conveyor system manufacturer) consists of thousands of parts derived from a small library (<70) of fairly smart (ilogic) assets.
I'm pretty sure I've already submitted to IdeaStation but I will certainly doublecheck and post if its not there. Thanks again.
Thank you guys...yes I'm aware of how the occurrences 'work' which is why I was hoping for a slick work-around. Its trivial to get a 'custom' BOM listing exported that lists every part individually with whatever unique identifier I wish. The trick I'm looking for is to populate that same identifier on the 2D file as it comes out of Inventor. Replicating the part files or notating them manually is not practical since our layouts (we're a conveyor system manufacturer) consists of thousands of parts derived from a small library (<70) of fairly smart (ilogic) assets.
I'm pretty sure I've already submitted to IdeaStation but I will certainly doublecheck and post if its not there. Thanks again.
Hi dave,
If you write the assembly occurrence unique ID to the part file's custom iProperties, so that the assembly drawing can read them, the part file would end up with an infinite number of custom iProperties, would it not?
I can imagine if I use part number 456-78 in assembly 123-01, 50 times, then 456-78.ipt will end up with 50 custom iproperties entries (starting at number UID01 and going to UID50)
And then later if I use part number 456-78 in assembly 223-02, 100 times, then 456-78.ipt will end up with 150 custom iproperties entries ( but the new UID numbers will start at number UID51 and go to UID150).
And then later if I use change 456-78 in assembly 123-01, and remove 8 of the occurrences of 456-78.ipt (occurrence numbers 6, 17, 22, 23, & 48), then my UID numbering in 456-78.ipt might need to be re-indexed?
But then later if I add in 12 more occurrences of of 456-78.ipt to assembly 123-01, now I have I have to add UID numbers to the custom iPropeties of the part again, but I have to try and figure out how to re-index them, without stepping on the UID numbers of assembly 223-02.
So, I think you'd start to have a big mess.
I suppose you could use the assembly part number and the part occurrence number to make up the UID number, and then only use the last part of this in the drawing. But the problem there is that if you have an assembly that uses 50 occurrences of the same part, and you remove occurrence 12-20, and then add 3 more occurrences, Inventor adds the last three as occurrence 51,52 & 53.
I imagine this request can be done, but there would need to be a lot more information given to make it work. And I don't think the custom iProperties of the part files are the best mechanism to hold the UID numbers.
Just some thought to kick around, feel free to provide more details, and if it starts to gel for me, I might try coding some iLogic (no promises on that though).
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
Hi dave,
If you write the assembly occurrence unique ID to the part file's custom iProperties, so that the assembly drawing can read them, the part file would end up with an infinite number of custom iProperties, would it not?
I can imagine if I use part number 456-78 in assembly 123-01, 50 times, then 456-78.ipt will end up with 50 custom iproperties entries (starting at number UID01 and going to UID50)
And then later if I use part number 456-78 in assembly 223-02, 100 times, then 456-78.ipt will end up with 150 custom iproperties entries ( but the new UID numbers will start at number UID51 and go to UID150).
And then later if I use change 456-78 in assembly 123-01, and remove 8 of the occurrences of 456-78.ipt (occurrence numbers 6, 17, 22, 23, & 48), then my UID numbering in 456-78.ipt might need to be re-indexed?
But then later if I add in 12 more occurrences of of 456-78.ipt to assembly 123-01, now I have I have to add UID numbers to the custom iPropeties of the part again, but I have to try and figure out how to re-index them, without stepping on the UID numbers of assembly 223-02.
So, I think you'd start to have a big mess.
I suppose you could use the assembly part number and the part occurrence number to make up the UID number, and then only use the last part of this in the drawing. But the problem there is that if you have an assembly that uses 50 occurrences of the same part, and you remove occurrence 12-20, and then add 3 more occurrences, Inventor adds the last three as occurrence 51,52 & 53.
I imagine this request can be done, but there would need to be a lot more information given to make it work. And I don't think the custom iProperties of the part files are the best mechanism to hold the UID numbers.
Just some thought to kick around, feel free to provide more details, and if it starts to gel for me, I might try coding some iLogic (no promises on that though).
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
A big mess indeed.....
Your summary is descriptive and correct, so when I reached that same conclusion I started posting my dilemna here to ask the greater community for ideas. I am more than willing to post additional information but how about if we start with a 'simplified' case. Can anyone think of a way to get the occurrence name of an instance on the 2D export? (Ideally by the part it represents).
The 'Sync AutoCAD' feature of FDS is a bit cryptic to us and we would love to discover ways to push more information through that data flow. We realize that the FDS APIs are not available, which may be where our final answer lies, but I'm open to other creative solutions along the way.
Please let me know what specific information about our situation would help provide more insight. Thanks again.
A big mess indeed.....
Your summary is descriptive and correct, so when I reached that same conclusion I started posting my dilemna here to ask the greater community for ideas. I am more than willing to post additional information but how about if we start with a 'simplified' case. Can anyone think of a way to get the occurrence name of an instance on the 2D export? (Ideally by the part it represents).
The 'Sync AutoCAD' feature of FDS is a bit cryptic to us and we would love to discover ways to push more information through that data flow. We realize that the FDS APIs are not available, which may be where our final answer lies, but I'm open to other creative solutions along the way.
Please let me know what specific information about our situation would help provide more insight. Thanks again.
In reviewing this thread I realized that its probably confusing because I highjacked someone else's question. While the OP was looking at iProperty for containing occurrence names I do not have that as a requirement. My main goal is to get the occurrence name (or some kind of UID for each INSTANCE) carried out to the 2D Export to AutoCAD. We are striving to provide more complete annotation on our 2D files and having a unique identifier on every block on the CAD file is a great first step for us.
Hope this helps clarify my request some more, thanks for the replies!
Dave
In reviewing this thread I realized that its probably confusing because I highjacked someone else's question. While the OP was looking at iProperty for containing occurrence names I do not have that as a requirement. My main goal is to get the occurrence name (or some kind of UID for each INSTANCE) carried out to the 2D Export to AutoCAD. We are striving to provide more complete annotation on our 2D files and having a unique identifier on every block on the CAD file is a great first step for us.
Hope this helps clarify my request some more, thanks for the replies!
Dave
I aplogize for my absence during the discussion.. My company wanted to put tag numbers in the balloons instead of item numbers. That makes sens for example for valves of the same type and size. I tried to see if possible, but in a short time I realized it isn't really and even will not make sense for the other components. So we dropped the idea. Now we have a custom property in parts list called TAG, and we have to add manually the tag numbers of the same valve and if you add let's say around 20 tag numbers in one cell (usually a tag nr for a valve looks like "XV 5100-02") it doesn't look nice...
So still looking for a way to sort out this problem.
Thanks for your input, very appreciated!
I aplogize for my absence during the discussion.. My company wanted to put tag numbers in the balloons instead of item numbers. That makes sens for example for valves of the same type and size. I tried to see if possible, but in a short time I realized it isn't really and even will not make sense for the other components. So we dropped the idea. Now we have a custom property in parts list called TAG, and we have to add manually the tag numbers of the same valve and if you add let's say around 20 tag numbers in one cell (usually a tag nr for a valve looks like "XV 5100-02") it doesn't look nice...
So still looking for a way to sort out this problem.
Thanks for your input, very appreciated!
I happened to see this topic today. I do need this function. As I'm working on piping assemblies for a high rise building. I have the same assembly used on different pipes and on different floor. I was trying to label different assemblies with unique occurrence name, say system & floor level. And in my BoM, I can have this information when we tag the assemblies when packaging. And later the package can be delivered to the correct floor to correct pipe.
Unless there is another way to achieve this goal.
I happened to see this topic today. I do need this function. As I'm working on piping assemblies for a high rise building. I have the same assembly used on different pipes and on different floor. I was trying to label different assemblies with unique occurrence name, say system & floor level. And in my BoM, I can have this information when we tag the assemblies when packaging. And later the package can be delivered to the correct floor to correct pipe.
Unless there is another way to achieve this goal.
We use tags here as well, building curtainwall systems. We have a piece of custom software that generates the tags for us however its loaded with issues. The one that hurts the most is if the application is run and a week later something changes, you need to rerun the application and resubmit the report, tags are all different.... really sucks when the job is on the floor midway being cut....
We use tags here as well, building curtainwall systems. We have a piece of custom software that generates the tags for us however its loaded with issues. The one that hurts the most is if the application is run and a week later something changes, you need to rerun the application and resubmit the report, tags are all different.... really sucks when the job is on the floor midway being cut....
Try this code.
Public Sub GetComponentReferencedByBalloon()
' Set a reference to the active drawing document
Dim oDoc As DrawingDocument
Set oDoc = ThisApplication.ActiveDocument
' Set Reference to Active Sheet on Drawing
Dim oSheet As Sheet
Set oSheet = oDoc.ActiveSheet
' Iterate through all the balloon in Sheet
Dim oBalloon As Balloon
For Each oBalloon In oSheet.Balloons
' Set Refrence to the Leader attached to the balloon
Dim leader As leader
Set leader = oBalloon.leader
'assuming the leader is a single line segment
Dim leaderNode As leaderNode
Set leaderNode = leader.AllNodes(2)
' Set the intent of the leader
Dim intent As GeometryIntent
Set intent = leaderNode.AttachedEntity
' Set Reference to the curve that the leader points to
Dim curve As DrawingCurve
Set curve = intent.Geometry
' Set Reference to the geoetry that the curve belongs to
Dim oModelGeom As Object
Set oModelGeom = curve.ModelGeometry
' Get component occurance that the model geometry belongs to
Dim occurrence As ComponentOccurrence
Set occurrence = oModelGeom.ContainingOccurrence
' MsgBox "The part number is: " & occurrence.Name
' Iterate through all the balloon sets
Dim oBalloonValueSet As BalloonValueSet
For Each oBalloonValueSet In oBalloon.BalloonValueSets
'Dim strDisplay As String
' strDisplay = "Balloon Item Number: "
' Set Reference to the Quantity value of the component from the BOM
Dim oCount As Integer
oCount = oBalloonValueSet.ReferencedRow.BOMRow.ItemQuantity
' Set Reference to the Item Number on the BOM
Dim oBalloonNumber As Integer
oBalloonNumber = oBalloonValueSet.ItemNumber
' MsgBox "Balloon Number: " & oBalloonNumber & " - " & oCount
' If More than One Components, update Balloon with Item Number & Occurance Name
If oCount > 1 Then
oBalloonValueSet.OverrideValue = oBalloonValueSet.Value & " - " & occurrence.Name
Else
' Do Nothing
End If
Dim oDrawingBOMRow As DrawingBOMRow
Set oDrawingBOMRow = oBalloonValueSet.ReferencedRow
If oDrawingBOMRow.Custom Then
' The referenced item is a custom parts list row.
' strDisplay = strDisplay & vbNewLine & "Referenced Component(s):"
' strDisplay = strDisplay & vbNewLine & " Custom PartsList Row"
Else
Dim oBOMRow As BOMRow
Set oBOMRow = oDrawingBOMRow.BOMRow
' Add the Item Number from the model BOM.
' strDisplay = strDisplay & vbNewLine & "BOM Item Number: " & oBOMRow.ItemNumber
' strDisplay = strDisplay & vbNewLine & "Referenced Component(s):"
Dim oCompDefs As ComponentDefinitionsEnumerator
Set oCompDefs = oBOMRow.ComponentDefinitions
If oDrawingBOMRow.Virtual Then
' The referenced item is a virtual component.
' strDisplay = strDisplay & vbNewLine & " Virtual: " & oCompDefs.Item(1).DisplayName
Else
' Add the document name of the referenced component.
' There could be multiple if the balloon references
' a merged BOM row in the model.
Dim oCompDef As ComponentDefinition
' strDisplay = vbNewLine & strDisplay & vbNewLine & " " & oPartDef.Document.FullDocumentName
End If
End If
' MsgBox strDisplay
Next
Next
End Sub
Regards,
Dhaval
Try this code.
Public Sub GetComponentReferencedByBalloon()
' Set a reference to the active drawing document
Dim oDoc As DrawingDocument
Set oDoc = ThisApplication.ActiveDocument
' Set Reference to Active Sheet on Drawing
Dim oSheet As Sheet
Set oSheet = oDoc.ActiveSheet
' Iterate through all the balloon in Sheet
Dim oBalloon As Balloon
For Each oBalloon In oSheet.Balloons
' Set Refrence to the Leader attached to the balloon
Dim leader As leader
Set leader = oBalloon.leader
'assuming the leader is a single line segment
Dim leaderNode As leaderNode
Set leaderNode = leader.AllNodes(2)
' Set the intent of the leader
Dim intent As GeometryIntent
Set intent = leaderNode.AttachedEntity
' Set Reference to the curve that the leader points to
Dim curve As DrawingCurve
Set curve = intent.Geometry
' Set Reference to the geoetry that the curve belongs to
Dim oModelGeom As Object
Set oModelGeom = curve.ModelGeometry
' Get component occurance that the model geometry belongs to
Dim occurrence As ComponentOccurrence
Set occurrence = oModelGeom.ContainingOccurrence
' MsgBox "The part number is: " & occurrence.Name
' Iterate through all the balloon sets
Dim oBalloonValueSet As BalloonValueSet
For Each oBalloonValueSet In oBalloon.BalloonValueSets
'Dim strDisplay As String
' strDisplay = "Balloon Item Number: "
' Set Reference to the Quantity value of the component from the BOM
Dim oCount As Integer
oCount = oBalloonValueSet.ReferencedRow.BOMRow.ItemQuantity
' Set Reference to the Item Number on the BOM
Dim oBalloonNumber As Integer
oBalloonNumber = oBalloonValueSet.ItemNumber
' MsgBox "Balloon Number: " & oBalloonNumber & " - " & oCount
' If More than One Components, update Balloon with Item Number & Occurance Name
If oCount > 1 Then
oBalloonValueSet.OverrideValue = oBalloonValueSet.Value & " - " & occurrence.Name
Else
' Do Nothing
End If
Dim oDrawingBOMRow As DrawingBOMRow
Set oDrawingBOMRow = oBalloonValueSet.ReferencedRow
If oDrawingBOMRow.Custom Then
' The referenced item is a custom parts list row.
' strDisplay = strDisplay & vbNewLine & "Referenced Component(s):"
' strDisplay = strDisplay & vbNewLine & " Custom PartsList Row"
Else
Dim oBOMRow As BOMRow
Set oBOMRow = oDrawingBOMRow.BOMRow
' Add the Item Number from the model BOM.
' strDisplay = strDisplay & vbNewLine & "BOM Item Number: " & oBOMRow.ItemNumber
' strDisplay = strDisplay & vbNewLine & "Referenced Component(s):"
Dim oCompDefs As ComponentDefinitionsEnumerator
Set oCompDefs = oBOMRow.ComponentDefinitions
If oDrawingBOMRow.Virtual Then
' The referenced item is a virtual component.
' strDisplay = strDisplay & vbNewLine & " Virtual: " & oCompDefs.Item(1).DisplayName
Else
' Add the document name of the referenced component.
' There could be multiple if the balloon references
' a merged BOM row in the model.
Dim oCompDef As ComponentDefinition
' strDisplay = vbNewLine & strDisplay & vbNewLine & " " & oPartDef.Document.FullDocumentName
End If
End If
' MsgBox strDisplay
Next
Next
End Sub
Regards,
Dhaval
Hi @dhaval3112,
Is it possible for the code you provided to replace another field, for instance, Part Number with the occurrence number on a ballooning system?
Thanks,
Kurt
Hi @dhaval3112,
Is it possible for the code you provided to replace another field, for instance, Part Number with the occurrence number on a ballooning system?
Thanks,
Kurt
Hi, @K_Baker_89
I think yes it is possible if we add additional balloon style for occurrence number & same we can assign in VBA code.
And another balloon style for remaining part number.
Regards,
Dhaval
Hi, @K_Baker_89
I think yes it is possible if we add additional balloon style for occurrence number & same we can assign in VBA code.
And another balloon style for remaining part number.
Regards,
Dhaval
Hi @dhaval3112,
Thanks for the quick reply!
Maybe it's easiest if I attempt to explain what I'm trying to achieve...
The VBA you provided overwrites Item Number. I'm looking to be able to display the Item Number, so I need the VBA to overwrite any other field (e.g. Part Number) in the balloon.
Apologies if I've not understood your last response and thanks for your patience!
Kurt
Hi @dhaval3112,
Thanks for the quick reply!
Maybe it's easiest if I attempt to explain what I'm trying to achieve...
The VBA you provided overwrites Item Number. I'm looking to be able to display the Item Number, so I need the VBA to overwrite any other field (e.g. Part Number) in the balloon.
Apologies if I've not understood your last response and thanks for your patience!
Kurt
Hi dhaval3112
Any chance you could provide this as ilogic code?
This would be much appreciated if you could.
Hi dhaval3112
Any chance you could provide this as ilogic code?
This would be much appreciated if you could.
Can't find what you're looking for? Ask the community or share your knowledge.