Set subassembly to flexible by ilogic.

Set subassembly to flexible by ilogic.

gma
Advocate Advocate
972 Views
2 Replies
Message 1 of 3

Set subassembly to flexible by ilogic.

gma
Advocate
Advocate

Hello,

 

Is it possible to always set a assembly to flexible... So when i put it in an assembly, it will be standard flexible.

 

If not.

 

Is it possible to make an ilogic so when I put a subassembly into an assembly, I can run a rule so every subassembly starting with "StandardLeg" will be flexble?

 

Thanks in advance.

0 Likes
Accepted solutions (1)
973 Views
2 Replies
Replies (2)
Message 2 of 3

JhoelForshav
Mentor
Mentor
Accepted solution

@gma 

I don't think you can make the subassembly always flexible on place... You can however run this code in the main assembly after you've placed your components to make the subassemblies starting with "StandardLeg" flexible 🙂

Dim oAsm As AssemblyDocument = ThisDoc.Document
For Each oOcc As ComponentOccurrence In oAsm.ComponentDefinition.Occurrences
	Try
	If oOcc.Definition.Document.DocumentType = DocumentTypeEnum.kAssemblyDocumentObject _
		AndAlso oOcc.Name.StartsWith("StandardLeg") Then oOcc.Flexible = True
	Catch
	End Try
Next

 

Message 3 of 3

gma
Advocate
Advocate

Solved

 

Thank you very much

0 Likes