Making Points Visible in SU Model Space (Ruby Script ?)


#1

Hi,

One of the beginning Ruby tutorials shows how to use the Ruby Console to set points into the SketchUp Model, and it concludes by showing how to draw a line between them.

I would basically like to enter in the point, and then have it display a mark so that I can see it’s location in the model space.

I think (but could be wrong), that this is possible because I’ve seen other plugins make a visible mark on the center point of an Arc or Circle for example.


I’m just trying to adopt this sort of thing so that I can use it for locating x/y coordinate points in the SketchUp model space.

I have a table of known x/y values, and I need to get them into SketchUp so that I can work on curve fitting options that can connect the points.

In the AutoCAD world I would do this by using the Point Function (to locate the point), and then assign a point style by using the PDMode settings, or even adjust it’s size with PDSize (which I mention just in case others are familiar with this as well).

In SketchUp, I figure that I’d be using a component for the point style. but then before I can even get that far, I first need to set the points location and make it visible some how.

I’d prefer to use the Ruby Console if I can since it seems easier to do that, and it also mimics how I used to do this using the AutoCAD command line – which I wish was also an option in SketchUp.

Does Anybody have any idea on how I can pull this off in the Ruby Script world.

Take Care,

Jim


#2

What you want is probably a Construction Point, which you add to an Entities collection using add_cpoint.


#3

Thank You!!

I searched for ‘Ruby add_cpoint’ and came up with the following… https://groups.google.com/forum/#!topic/sketchuphowto/SV1tgrJ0NPA . . . Which looks promising.

I’ll try it out later this evening and see how things go. I’d very much like to start writing some Ruby Scripts of my own, and since I’m a beginner in this area I need to start out relatively simple. At the moment my x/y point idea seem like a good place to start the experimentation. . . and I thank you again for letting me know about the ‘add_cpoint’ option.

Take Care,

Jim


#4

Cloud v8.0bxx SketchUp plugin by Didier Bur (w/ recent update by TIG)