c# Programmatically select all entities and copy them to the clipboard

c# Programmatically select all entities and copy them to the clipboard

mcoH3VZV
Advocate Advocate
504 Views
1 Reply
Message 1 of 2

c# Programmatically select all entities and copy them to the clipboard

mcoH3VZV
Advocate
Advocate

Hi,

 

I have a program that does several things, and at the end, I want it to select all the resulting entities on the drawing and put them on the clipboard (lines, blocks, and text). This way, the user simply needs to paste the result wherever they need.

 

I am just looking for the correct syntax for selecting items and for setting the clipboard.

Clipboard.SetData (for all data in the drawing)? What format should be used?

 

Thanks

0 Likes
505 Views
1 Reply
Reply (1)
Message 2 of 2

BlackBox_
Advisor
Advisor

There's a lot of sample code for making selections.

 

For clipboard though, you might consider COPYBASE Command instead; you can supply base point programmatically, or prompt user to specify a point, to make it easier for them to paste into their drawing where they need. 

 

Cheers


"How we think determines what we do, and what we do determines what we get."

Sincpac C3D ~ Autodesk Exchange Apps

0 Likes