Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5846

Rename points in Python

$
0
0

Hi,

The Python script below gives me the point names of 3d points in my workspace. However not all have names and by default are named " None" so I want to change these names to “No Name” either by default or in the script. All suggestions welcome as new to Python and just getting into it slowly.

Roger

import rhinoscriptsyntax as rs

objectIds = rs.GetObjects(“Pick measured points”, rs.filter.point)
for id in objectIds:
objectname = rs.ObjectName(id)
objectcoord = rs.PointCoordinates(id)
print objectname,",",objectcoord

4 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 5846

Latest Images

Trending Articles



Latest Images