Search found 6 matches

by Justinas Rubinovas
Wed May 12, 2021 6:06 pm
Forum: API
Topic: Making a virtual component with solid body copies from all other components
Replies: 11
Views: 1516

Re: Making a virtual component with solid body copies from all other components

This seems very roundabout... Why not actually save the dang assembly as a part, insert to assembly, and then make it virtual? Same end result, right? Possible, but in the end, I need these bodies as temporary bodies in the virtual component in that assembly, so after this saving, inserting, making...
by Justinas Rubinovas
Wed May 12, 2021 3:09 pm
Forum: API
Topic: Making a virtual component with solid body copies from all other components
Replies: 11
Views: 1516

Re: Making a virtual component with solid body copies from all other components

You do not need to reverse the transform rather use direct IComponent2::Transform2. Also, you do not need to apply sub-assemblies transform, if you get your component from the root level the transform will be related to the top assembly coordinate system regardless of the level of the component. Th...
by Justinas Rubinovas
Tue May 11, 2021 4:32 pm
Forum: API
Topic: Making a virtual component with solid body copies from all other components
Replies: 11
Views: 1516

Re: Making a virtual component with solid body copies from all other components

Alright, then let's wait for the cavalry to show up. Thanks for tagging them, I'm really looking forward to some comments.
by Justinas Rubinovas
Tue May 11, 2021 3:24 pm
Forum: API
Topic: Making a virtual component with solid body copies from all other components
Replies: 11
Views: 1516

Re: Making a virtual component with solid body copies from all other components

mattpeneguy wrote: Tue May 11, 2021 3:01 pm I can pick apart VBA and sometimes make it do what I want. VB.net and C# give me a headache when I try to figure it out. Hopefully one of the three I pinged will come along and help.
Well it's super simple in this case. I added plenty of comments to make it even simpler to understand :)
by Justinas Rubinovas
Tue May 11, 2021 2:58 pm
Forum: API
Topic: Making a virtual component with solid body copies from all other components
Replies: 11
Views: 1516

Re: Making a virtual component with solid body copies from all other components

This is interesting. Care to post the code you've got so far? Sure thing! Here is what I got (in VB.NET): Function main() Dim components As List(Of Component2) = GetPartComponentDocs(assemblyDoc) 'Get components which will be searched for solid bodies Dim virtualComponent As Component2 = InsertVirt...
by Justinas Rubinovas
Tue May 11, 2021 10:22 am
Forum: API
Topic: Making a virtual component with solid body copies from all other components
Replies: 11
Views: 1516

Making a virtual component with solid body copies from all other components

Hi, I am trying to write a macro that goes through the assembly, collects all solid bodies from all the components, then creates a virtual part inside the assembly, and places copies of all these solid bodies into that virtual part as temporary bodies. I need the temporary bodies in that virtual par...