Assuming you already have an active connection from your automation to an open DxDesigner session, you would do something like this:
Sub fix_props()
Dim attr As ViewDraw.Attribute
Dim sym_name AsString
Dim comp As ViewDraw.Component
Dim comp_col AsObject
Dim view As ViewDraw.View
blok = Nothing
view = app.ActiveView
comp_col = view.query(128, 1)
ForEach comp In comp_col
'get the symbol naame
attr = comp.FindAttribute("Symbol")
IfNot attr IsNothingThen
sym_name = attr.Value
EndIf
'change the partition naame
attr = comp.FindAttribute("Partition")
IfNot attr IsNothingThen
attr.Value = "New_Partition_Name"
EndIf
Next
EndSub
However, changing the partition value like this is not a good idea. If you are using DxDatabook, you should change it in the part's databook entry in your database.
If you are replacing a part, it's a whole other can of worms which is much more complicated than can be treated in a thread like this. It would take an entire application with a lot more going on.