find what the density is ?

find what the density is ?

Darkforce_the_ilogic_guy
Advisor Advisor
474 Views
3 Replies
Message 1 of 4

find what the density is ?

Darkforce_the_ilogic_guy
Advisor
Advisor

I  want to find a way to find the density of all the part. and paint the part ....

 

I have the code for paint the part ... now I need to find out if i can find out with componemt that need to get paited

 

can I use this for each loop to finde it?  can anyone tell me how to do it with it ... code below does not work ..but believe it is very to to what i need

 

 

 

 

Dim oAsmDoc As AssemblyDocument
	oAsmDoc = ThisApplication.ActiveDocument
	

Dim oRefDocs As DocumentsEnumerator
	oRefDocs = oAsmDoc.AllReferencedDocuments
	Dim oRefDoc As Document
	
	For Each oRefDoc In oRefDocs



D = oRefDoc.PhysicalPropertiesAsset.item("density") 
MsgBox(D)

next 

 

 

 

 

0 Likes
475 Views
3 Replies
Replies (3)
Message 2 of 4

bradeneuropeArthur
Mentor
Mentor

Hi @Darkforce_the_ilogic_guy 

Based on what value needs it to be painted?

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 3 of 4

1 . which as a rule is because the user has forgotten to give the componemt  it proper weight

0 Likes
Message 4 of 4

bradeneuropeArthur
Mentor
Mentor
Dim oAsmDoc As AssemblyDocument
	oAsmDoc = ThisApplication.ActiveDocument
	

Dim oRefDocs As DocumentsEnumerator
	oRefDocs = oAsmDoc.AllReferencedDocuments
	Dim oRefDoc As Document
	
	For Each oRefDoc In oRefDocs



D = oRefDoc.PropertySets.Item(3).item("density").value 
MsgBox(D)

next 

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