Everything related to SDK.
User avatar
By Willy121173
#358157
Hello,

I'm using (learning) python to create a scene to render in Maxwell, but for some reason I cannot use the Cvector function.
The line :
Code: Select all
base.origin = Cvector.assign (0.5,0.5,1.0);
gives me the following error :
Code: Select all
TypeError: unbound method Cvector_assign() must be called with Cvector instance as first argument (got float instance instead)
I interpret this error as if Cvector.assign(double,double,double) does not exist, but according to the documentation it should.

Any idea what I'm doing wrong here?

Thanks in advance!

Regards,
Willy
User avatar
By Brany
#358163
Hello!

"assign" is a Class method (non-static), so you have to call it from the object itself like this:

base.origin.assign(0.5,0.5,1.0);

Another way to do the same, is creating a CVector object with the values you want, setting the base.origin property like this:

base.origin = Cvector(0.5,0.5,1.0);

Both are correct ;)

Hope it helps!

Greetings, One of my users with Sketchup 2025 (25[…]

Maxwell Rhino 5.2.6.8 plugin with macOS Tahoe 26

Good morning everyone, I’d like to know if t[…]

Sketchup 2026 Released

Sketchup has released 2026 version today. When may[…]

Help with swimming pool water

I've had closer look at the pool image above. I[…]