Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Copy objects to clickboard

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
Hubert_Los
232 Views, 3 Replies

Copy objects to clickboard

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.

Tags (4)
3 REPLIES 3
Message 2 of 4
FINET_Laurent
in reply to: Hubert_Los

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"

@LinkedIn     @JohnCockerill

Message 3 of 4
WCrihfield
in reply to: Hubert_Los

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

EESignature

(Not an Autodesk Employee)

Message 4 of 4
Hubert_Los
in reply to: WCrihfield

@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.

Post to forums  

Technology Administrators


Autodesk Design & Make Report