1 of 1 people found this helpful
That refdes is a new object with VX. I'm not sure exactly what it is. My guess is either FabricationLayerText or ConductorLayerText.
In the first case, here's an example of some of the things you might do to interact with it:
comps = doc.Components(0)
For Each comp In comps
'Loop through all the Fab text on the component
fabtxt_objs = comp.FabricationLayerTexts
fabtxt_obj = Nothing
For Each fabtxt_obj In fabtxt_objs
If fabtxt_obj.Type = 1 Then 'Select out Assy Text
If not fabtxt_obj.TextString = comp.RefDes Then 'stuff other than refdes
fabtxt_obj.Format.Font = assyfont
fabtxt_obj.Format.Orientation = 0
fabtxt_obj.Format.HorizontalJust = 0
fabtxt_obj.Format.VerticalJust = 0
if comp.Side = 1 then
fabtxt_obj.Format.Mirrored = false
fabtxt_obj.Format.Mirrored = True
fabtxt_obj.Format.Font = assyfont
fabtxt_obj.Format.Bold = False
In the case of ConductorLayerText, you would probably treat it similarly, as in
clayertxts = comp.ConductorLayerTexts
For Each clayertxt In clayertxts
If clayertxt.TextType = 1 Then 'Type 1 is epcbTextRefDes
clayertxt.Format.Height = 50
'etc, same as above
Information about the fabrication and conductor layer text objects is in the help. The .Type and .TextType properties are listed there, with information on what kind of object each type is.
I did some testing. No joy so far. Doesn't seem to be picked up by either fab or conductor layer text collections. Will continue investigation and post results.
Patrick , -
thanks for the answer & testing. Thats also my outcome, that this is not accessible.
The Point why I am looking for this Property is, that the RefDes Text information is always well scaled / sized.
I did a RefDes Synchronizer for Assembly and Silkscreen Layer,
similar to here: Assembly and Silkscreen Ref Des rearrange
but my Problem was that when I modify the Silkscreen or Assembly Layer Text,
the Extrema, grows and shrinks with the text.
I also tried other ways (Component Outline / Shape) to scale my RefDes Text,
but no real success.
I thought using the RefDes Format especially Position and Text Height,
of the Part will get best results, but ....
Hopefully in one of the next releases
Do you or someone else know, if Mentor has a kind of wishlist,
for future releases ?
Not sure but I guess what you are searching for is the component fabricationlayertexts -> item.format > hight / font......
see example in excel vba
Ist displays the refdes hight,text and format of ONE SELECTED component and changes the refdes hight to 5
Set pcbapp = GetObject(, "MGCPCB.ExpeditionPCBApplication")
Set pcbDoc = pcbapp.ActiveDocument
retVal = licenseDoc(pcbDoc)
If (retVal <> 1) Then Set pcbDoc = Nothing
Set parts = pcbDoc.Components(epcbSelectSelected)
Set FabLayerText = parts(1).FabricationLayerTexts
For i = 1 To FabLayerText.Count
If parts(1).Name = FabLayerText(i).Name Then
'change hight value
FabLayerText(i).Format.Height = 5
Set pcbDoc = Nothing
Set pcbapp = Nothing
thanks for the answer. I already found that one, but this only sets the Font Properties (Type, Height ...) of
Silkscreen Fab Layer or the Assembly Fab Layer. I am looking for a way, to get the height of exactely the
Part RefDes and assign it to Silkscreen and Assembly Layer.
The Big benefit of using that "Part RefDes" is that it is always well scaled and positioned within the component.
I have also tried other ways to do a nice scaling of the Silk/Asm Fab Layer Text, but currently withou success.
It seems that this is missing in the API like stated by Patrick above.
Any other idea how to get that info ?