Access "Change Size" for a Content Center Component through the API?

Access "Change Size" for a Content Center Component through the API?

Anonymous
Not applicable
1,107 Views
4 Replies
Message 1 of 5

Access "Change Size" for a Content Center Component through the API?

Anonymous
Not applicable

Hi there everyone,

     The issue I am having today is with finding a method to access the "Change Size" option that appears when you right click a Content Center component within an assembly. I've circled the exact option here:

 

IWantToAccessThis.png

 

Is there any way to access or call this within an iLogic Rule? I have yet to find anything within the help section, so I'm looking forward to any replies on the matter!

 

 

0 Likes
Accepted solutions (2)
1,108 Views
4 Replies
Replies (4)
Message 2 of 5

bradeneuropeArthur
Mentor
Mentor
Accepted solution
Public sub Main
Dim CmdMan As ControlDefinition 'Set CmdMan = ThisApplication.CommandManager.ControlDefinitions.Item("Command Name") Set CmdMan = ThisApplication.CommandManager.ControlDefinitions.Item("CCV2ChangeSizeButtonCM") CmdMan.Execute CmdMan.Execute2 (True)
end sub
----------- These are the possible other command names: CCV2ChangeSizeButtonCM Change size of Standard Component CCV2EditorButton Open Content Center Editor CCV2OpenButton Open Component from Content Center CCV2OpenCWButton Access Autodesk Manufacturing Supplier Content Center CCV2PlaceButton Place Component from Content Center CCV2PlaceButtonCM Place Component from Content Center CCV2PlaceFeatureButton Place Feature from Content Center CCV2PlaceFeatureButtonCM Place Feature from Content Center CCV2PublishButton Publish Part to Content Center CCV2ReplaceButton Replace Component with Component from Content Center CCV2ReplaceButtonCM Replace Component with Component from Content Center CCV2RSCButton

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 5

Anonymous
Not applicable
Accepted solution

Thanks for the list of extra commands, looks like mine was a little incomplete. Might I ask how you generated it?

 

I was able to find the Content Family Identifier method, and coupled it with one of the other commands to reach a more direct solution:

 

 Sub Main()
	If ThisApplication.ActiveDocument.DocumentType <> kAssemblyDocumentObject Then
		MessageBox.Show("Please run this rule from the assembly file.", "iLogic")
		Exit Sub
	End If
	
	Dim oHexHeadNode As ContentTreeViewNode = ThisApplication.ContentCenter.TreeViewTopNode.ChildNodes.Item("Standard Parts & Assemblies")
	
	Dim oFamily As ContentFamily
    For Each oCheckFamily As ContentFamily In oHexHeadNode.Families()
        If oCheckFamily.DisplayName() = "Family Name" Then
            oFamily = oCheckFamily
            Exit For
        End If
    Next
	
	Dim oString As String = oFamily.ContentIdentifier()
	ThisApplication.CommandManager.PostPrivateEvent(PrivateEventTypeEnum.kStringEvent, oString)
	ThisApplication.CommandManager.ControlDefinitions.Item("CCV2PlaceButtonCM").Execute()
 End Sub
0 Likes
Message 4 of 5

bradeneuropeArthur
Mentor
Mentor
Could you please my solution as solved

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 5 of 5

bradeneuropeArthur
Mentor
Mentor
Do you need the List of "CommandManager" commands too?

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