Wish rs.IsShowGridAxis() and rs.IsShowGrid()


#1

Hi Steve
Can you add Python functions rs.IsShowGridAxis() and rs.IsShowGrid() that retun True or False?

Ciao Vittorio


#2

Hi Vittorio,
As a workaround…

import scriptcontext as sc

viewList=sc.doc.Views
for view in viewList:
    name=view.ActiveViewport.Name
    grid=view.ActiveViewport.ConstructionGridVisible
    axes=view.ActiveViewport.ConstructionAxesVisible
    if grid: grid="Yes"
    else: grid="No"
    if axes: axes="Yes"
    else: axes="No"
    print "View name {} : GridVisible={} AxesVisible={}".format(name,grid,axes)

Cheers, --Mitch


#3

Hi Mitch
Many thanks. Your example is Ok.
Ciao Vittorio