VisualARQ how to make a copy of a beam in C#

I need to make a copy of a beam object in C# but everything that I have tried creates a block instance that is not a beam and the beam functionality is lost! Is there a way to copy beam objects and keep the beam functionality? Thanks

1 Like

I also asked multiple times how to interact with VisualARQ objects (never tried myself) and never got an answer. At least the developer support seems not to exist: RhinoCommon: Interaction with Objects from for example VisualARQ?

Hi @patskorut,

Sorry for the late response, as I’ve been very busy with the release of VisualARQ 3 and fixing the serious errors reported.

Regarding your question: How are you creating a copy? In RhinoCommon, the best way to duplicate an object is to call the method RhinoDoc.Objects.Duplicate(). I haven’t tried myself, but I think this method should work with VisualARQ custom objects.

Regards,

Enric

Enric,

No problem, thanks for the reply that worked!!! I was a bit confused and was using GeometryBase duplicatedGeometry = rhinoObj.DuplicateGeometry(); which was copying the blockInstance so the beam functionality was getting lost.

I had another question, I am trying to apply some transforms to beam objects and can’t seem to get that to work either, Here is the code I am trying. Any help would be awesome. Thanks

                Guid rhinoObjDupId =  doc.Objects.Duplicate(rhinoObj);
                RhinoObject duplicatedObject = doc.Objects.Find(rhinoObjDupId);

                Transform translation = Transform.Translation(10, 12, 0);
                duplicatedObject.Geometry.Transform(translation);

                duplicatedObject.CommitChanges();

                doc.Objects.Add(duplicatedObject.Geometry);

Hi @patskorut,

Try to use the RhinoDoc.Objects.Transform() method. This method can also duplicate and transform in a single operation, passing false to the deleteOriginal parameter.

Enric