Get item From Content, but not place it

Get item From Content, but not place it

Anonymous
Not applicable
322 Views
2 Replies
Message 1 of 3

Get item From Content, but not place it

Anonymous
Not applicable

How would you go about getting an item from content center so it downloads to your CC library folder, but not place it in your assembly?

 

We're writing an application to generate models, and we need to be able to pull items from the library so we can place them separately.

 

Any help would be appreciated.

 

Thanks

 

0 Likes
323 Views
2 Replies
Replies (2)
Message 2 of 3

A.Acheson
Mentor
Mentor

@Anonymous 

 

You could just create and assembly use it as a conduit to  place the content center part and it would be saved to the content center files folder for further use, then delete the assembly once your finished. 

I used the code here

 https://adndevblog.typepad.com/manufacturing/2013/06/insert-content-center-part.html

but there is also a dedicated snippet in the iLogic editor that is perhaps too direct especially if you want to create the whole family. 

Dim componentA = Components.AddContentCenterPart("occNameA", "Fasteners:Bolts:Hex Head", "Bolt GB/T 29.1-1988",
                                                 "M3x16", position := Nothing, grounded := False, 
                                                 visible := True, appearance := Nothing)
Dim componentB = Components.AddContentCenterPart("occNameB", "Fasteners:Bolts:Hex Head", "Bolt GB/T 29.1-1988", 
                                                 {"Designation","M3x16","Thread Length","15.5"}, 
                                                 position := Nothing, grounded := False, 
                                                 visible := True, appearance := Nothing)

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
Message 3 of 3

_dscholtes_
Advocate
Advocate

And if you want an easy solution to generate all instances of a content center part in your temporary assembly, head over to https://forums.autodesk.com/t5/inventor-customization/create-every-possible-instance-of-a-content-ce... , where Jef_E posted a nice code for this. MechMachineMan explains exactly how to use it.

0 Likes