Skip to content

Instantly share code, notes, and snippets.

@mattcox
mattcox / SetCOM.cpp
Created February 15, 2019 15:27
Demonstrates how to implement a custom Polymorph object that implements the SetCOM method. When the COM object is allocated, the SetCOM method will be passed a copy of the object, which can be useful if the allocated object needs passing to additional methods from within the COM implementation. Note: As the COM object is maintaining a pointer to…
class SomeInterface :
public CLxImpl_Foo
{
public:
class MyPolymorph :
public CLxPolymorph<SomeInterface>
{
public:
virtual void
SetCOM(
@mattcox
mattcox / meshDumpCurvesCommand.py
Created November 7, 2019 10:33
Demonstrates how to print vertex information for the points on an ILxCurve.
#python
import lx
import lxifc
import lxu.command
import modo
class Command(lxu.command.BasicCommand):
def __init__(self):
lxu.command.BasicCommand.__init__(self)
import Cocoa
import Foundation
let pathToImage = "/some/path/to/an/image.png"
let pathToFolders = URL(fileURLWithPath: "/Some/Folder/Path/")
guard let image = NSImage(contentsOfFile: pathToImage) else {
fatalError("Unable to load image.")
}