Hello,
How can I copy the selected objects to the clickboard. For example, I selected 2 sketchedsymbols and I would like to copy them using code. Then paste them into another location. I don't see any cmd command that does this. I only found information about copying text, but that doesn't work in this case.
Solved! Go to Solution.
Solved by WCrihfield. Go to Solution.
Hello @Hubert_Los,
What are you refering to when talking about "another location" ?
I would peronally get all object in the document select set, exclude all that is not a sketched symbol, & for each symbols I would get their definition. Lastly I would allow the user to click a point on the drawing sheet & add the new symbols.
Kind regards,
FINET L.
If this post solved your question, please kindly mark it as "Solution"
If this post helped out in any way to solve your question, please drop a "Like"I agree with @FINET_Laurent that this process can be more complicated than it might seem sometimes, depending on what type of data or object is being copied / pasted, and what the current situation is like. Previous selections need to be cleared, wanted objects need to be selected, then copied, then they need to be unselected, then some navigation is often needed, then some sort of user interface interaction, or change in 'system focus' needs to happen, to indicate where the data/object will be pasted.
But below are a couple tips to help along the way:
ThisApplication.CommandManager.ControlDefinitions.Item("AppCopyCmd").Execute
ThisApplication.CommandManager.ControlDefinitions.Item("AppPasteCmd").Execute
https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.clipboard?view=windowsdesktop-8.0
In an iLogic rule, we can often just directly type in "Clipboard" (without the quotes), then type the dot (.) after it, to see all its properties & methods that are available to us. Using that directly on things other than text though, can be more complicated than using the Inventor commands.
Wesley Crihfield
(Not an Autodesk Employee)
@WCrihfield
"then they need to be unselected" this was very important. It works, thank you.
Can't find what you're looking for? Ask the community or share your knowledge.