see if a part is created by DesignSpring

see if a part is created by DesignSpring

Anonymous
Not applicable
490 Views
6 Replies
Message 1 of 7

see if a part is created by DesignSpring

Anonymous
Not applicable

Hello,

 

i know that there is an iProperty where you can check, if a part is a contentcenter part.

is there a similar method to check if a part is created by DesignSpring? 

 

Thank you

 

0 Likes
Accepted solutions (1)
491 Views
6 Replies
Replies (6)
Message 2 of 7

MrSmithtastic
Advocate
Advocate

You could try using something along these lines.

Dim oCompDef As ComponentDefinition

if oCompDef.Document.FullDocumentName.Contains("Spring") Then
do something
end if

Obviously some more code will be needed to get the Component Definition, but you get the idea?

0 Likes
Message 3 of 7

philip1009
Advisor
Advisor

Another way to check is possibly by Document SubType, here's a rule that will tell you the SubType as a GUID code for each referenced part and sub-assembly in an assembly:

 

SyntaxEditor Code Snippet

For Each oDoc As Document In ThisDoc.Document.AllReferencedDocuments
	MessageBox.Show(CStr(oDoc.SubType), oDoc.DisplayName)
Next

If the spring part comes up as a different GUID code than every other document in the assembly then this is a viable code to check.  For example here's a sample code I use to check if a part is a sheet metal part:

 

SyntaxEditor Code Snippet

If oDoc.SubType = "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" Then

 If this doesn't work for you, let us know and we'll find another method to single out spring parts.

0 Likes
Message 4 of 7

Anonymous
Not applicable

Hi and thank you for the answer. 

This is not exactly what I’m looking for. When I look for “sheet metal” as sub type I think it is possible to find a lot of parts in a big assembly, but I inly want to identity the springs created by the assistant. I saw, that they have another symbol in the model browser- so perhaps there is a way to identify them. 

 

Thank you

0 Likes
Message 5 of 7

bradeneuropeArthur
Mentor
Mentor
Accepted solution
Public Sub seeifapartiscreatedbyDesignSpring()
Dim a As Application
Set a = ThisApplication

Dim b As Document
Set b = a.ActiveDocument

Dim prs As PropertySet

For Each prs In b.PropertySets
Debug.Print prs.DisplayName
Next

If b.PropertySets.Item("FDesign").DisplayName = "FDesign" Then
MsgBox "this is a spring created with springdesign"
End If
End Sub

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 6 of 7

Anonymous
Not applicable

Thank you! Thats working.

But can you say me what FDESIGN means?

 

Thanks a lot

 

0 Likes
Message 7 of 7

bradeneuropeArthur
Mentor
Mentor

Hi,

Could you please mark this topic as solve for administrative reasons?

 

The name is chosen by Autodesk and makes it possible to add specific properties to this kind of products.

 

Regards,

Autodesk Software: Inventor Professional 2018 | Vault Professional 2018 | Autocad Mechanical 2018
Programming Skills: Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Dimension Component! | Partlist Export! | Derive I-properties! | Vault Prompts Via API! | Vault Handbook/Manual!
Drawing Toggle Sheets! | Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved ! 

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes