Hi,
I've used a bolt in my assembly from the content center. I saved this bolt as a custom part so it's in the same folder as my models. I've also added some work points to the bolt model to dimension in drawings.
I would like to use ilogic to change the bolt size (e.g from M10 to M20). I can do this manually by right clicking and selecting change size.
Is there a way to do this through ilogic? All I have seen so far is replacing the part from the content center which is not what i want to do as I lose my workpoints.
thanks,
John
Solved! Go to Solution.
Solved by WCrihfield. Go to Solution.
Hi @johnster100. I created a test scenario to test this situation on, but didn't save the bolt out and create work points on it. Then I proceeded to attempt to change the size of the bolt through use of an iLogic rule. Here is what I've got that has been working for me.
'name of your existing component (the one you want to change the size of)
Dim occName As String = "Heavy Hex Bolt - Inch 1/2-13 UNC - 1.25:2"
'Content Center category path down to the Family, but not including the Family
'each category name is seperated by colons (:)
Dim ccPath As String = "Fasteners:Bolts:Hex Head"
Dim familyName As String = "Heavy Hex Bolt - Inch"
'from the Table View, the value in the column who's internal name is 'Designation'
Dim designation As String = "1/2-13 UNC - 1.5"
Components.AddContentCenterPart(occName, ccPath, familyName, designation)
You can see from the names and notes within, what type of bolt I had in my assembly. To change its size, I simply changed something like the length ("1.5") to "1" (as long as it is available in the table), then run the rule, then it changes the size of that bolt, just as if I had right-clicked on it and chose the other length. I hope this is what you were looking for.
If this solved your problem, or answered your question, please click ACCEPT SOLUTION.
Or, if this helped you, please click (LIKE or KUDOS) 👍.
If you want and have time, I would appreciate your Vote(s) for My IDEAS :light_bulb:or you can Explore My CONTRIBUTIONS
Wesley Crihfield
(Not an Autodesk Employee)
Hi,
thanks for the reply.
Unfortunately this does not work. It replaces the bolt in the assembly with a new one from the content center so I lose the work points I had added 😞
thanks,
John
OK. I was just doing a little more testing and even though the PartComponentDefinition for the bolt I saved off locally does return True for its 'IsContentMember' property, there doesn't really appear to be any easy way to access any type of link or connection to the Content Center, that would allow you to 'change its size' at the part level, without 'replacing' it. The next thing I would suggest, since you need a local copy and need to maintain work features placed on it, is to change its size by just changing its parameter values.
I believe that by default, when you invoke the 'Place from Content Center' to place a component into an assembly, it creates a new model file and stores it within the directory designated for Content Center stuff, which is like a Library, where it's all ReadOnly. I don't recall if it reuses the same model file, if at a later date you insert the same configuration of a Content Center component into another assembly, but I'm thinking that it doesn't. So modifying the model stored within the Content Center folder may not work either.
Wesley Crihfield
(Not an Autodesk Employee)
thanks for your help. It's one for the idea station I guess.
thanks again,
John
Can't find what you're looking for? Ask the community or share your knowledge.