How to create camera component and get info from it?


the camera component above ,how to create it by code ruby,and how to get the camera related to this component?

Is this from Trimble’s Advanced Camera Tools ? If so …

The ACT cameras are a group that have an attribute dictionary named “camera” attached to the instance and also have a scene page named with their name and a " (ACT)" suffix.

So if the ACT camera’s name is "Camera 1" then it’s scene page will be named "Camera 1 (ACT)".

1 Like

yes,it is from Trimble’s Advanced Camera Tools, so what you mean is that I could get it’s attribute dictionary named “camera” to get the camera releated to this instance?

Yes.

And also the Ruby Sketchup::Camera object for the ACT camera’s scene Sketchup::Page object, which can give more information than what is in the attribute dictionary.


The ACT extension has encrypted code files, and there is no public API for it.

You’d be required to use class introspection to examine the modules and classes of the extension to “hack” the creation of an ACT camera.

“You’d be required to use class introspection to examine the modules and classes of the extension to “hack” the creation of an ACT camera.”
how to use class introspection to “hack” the creation of an ACT camera?
I want to create a new page ,and correlate it with a camera component ,which replace the old page

I am not going to teach basic core Ruby skills in this forum. I’ve posted quite a few links to online and downloadable Ruby books in my Ruby Learning Resources lists:


And I certainly am not going into detail publicly on how to hack an encrypted extension.