1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Accessing "Show Reference Geometry" from script ?

Discussion in 'Alibre Script' started by ThomasP, Aug 2, 2020 at 3:16 AM.

  1. ThomasP

    ThomasP New Member

    When creating assemblies I frequently turn on and off the "Show Reference Geometry" option for parts and subassemblies to get robust references for the different assembly constraints.
    After a while doing that the amount off shown references can make it very cluttered and difficult to handle.

    To fix that I am trying to create a script that iterates through all the assembly components and turn off the "Show Reference Geometry".

    I have searched the script reference I have but unfortunately I not yet been able to find any information about that function.
    I am thinking something like this:

    #iterate through all parts in an assembly and it's sub-assemblies
    def IteratePartsInAssembly(A):
    for P in A.Parts:
    #print ' Part %s (in %s)' % (P.Name, A.Name)
    SetReferenceGeometryVisibility(P, false)
    for SA in A.SubAssemblies:
    #print " Subassembly %s (in %s)" % (SA.Name, A.Name)
    SetReferenceGeometryVisibility(SA, false)

    #set the objects "Show Reference Geometry" option
    def SetReferenceGeometryVisibility(object, visibility):
    object.??????????????? = visibility

    Anyone knows where to find information about this?


Share This Page