cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

mapkey won't run on other parts

BenLoosli
23-Emerald II

mapkey won't run on other parts

I am trying to create a mapkey to update an annotation feature/note in our part and assembly files.

Currently, we have ASME Y14M-1994 called out as the standard to interpret drawings to, we need to update this to ASME Y14-2009.

Perfect candidate for a mapkey that can be run when any file is updated that has the 1994 date in it.

However, I can create the mapkey, save it. and when I run it on a different file, I get a popup Error window: Cannot perform this action in current context.

The steps I am doing are:

Open Model tree filters and enable Annotations

Expand Annotations and select properties on our default Tolerance_Std_note

Arrow down to the line after ASME Y14M-1994, back arrow to get to the '4', then delete the M-1994 and add the -2009

Select OK to close the window

Open model tree filters and turn off Annotations.

If I close and erase the file I created the mapkey in and then reopen it, the mapkey will work.

If I open another file, the mapkey fails with the error message above.

I did create a second mapkey in another file and compared them.

After opening the Annotation list, the selection of the tolerance note has a mapkey reference to a node#. The # is different in the 2 files, even though the both should have been created from the same start part. Is this node# session dependent or part dependent? Can it be made universal, so the mapkey will work?

On new parts, we will be modifying the start part templates.

I have added a PDF showing the 2 mapkeys that when run in the original file work fine, but other files.

Message was edited by: Ben Loosli

4 REPLIES 4

This is where AutoIt or AutoHotKey come in handy - they don't care about the internal data structure.

Maybe add a pause and then resume after the correct line is selected?

BenLoosli
23-Emerald II
(To:BenLoosli)

I trimmed my mapkey to see where it failed and it is the Edit Parameters mouse click on the Tolerance_std_note annotation feature.

That surprised me since at that point forward in the mapkey, everything for the file should be static.

Jose_Costa
6-Contributor
(To:BenLoosli)

You are right, in the modeltree features and annotations are identified by "nodes". This may be the problem.

You're not selecting the annotation so the the mapkey doesn't work.

Use the Search tool to select it. Try "by name" or by "id" filters.

dd2.png

You must test to see what works best.

Jose

David_Walker
5-Regular Member
(To:Jose_Costa)

Hello, I tried that and still received the same error.  I am confused why, when using the Serch tool to select the Distribution note, RMC properties, delete the contents, Insert from file, OK.  Then execute the mapkey on a different object and I get that same error Cannot perform this action in current context.

Top Tags