Copy button grayed out and other strange behaviour

5468
2
11-24-2011 03:55 AM
GinoMellino
Occasional Contributor
Hello,

Can someone please have a look at the following code and tell me where I am going wrong?

The overall structure is this: There is a 'live' version of current quarries and potential resources (Supply Zone and Resource MUIDs) which is used for visualisation, reporting, etc and are stored in a FGDB. When any edits need to be made to this data they are first stored in individual shapefiles (per edit session) and then need to be approved by an admin user before being added into the live data. The Supply Zone and Resource MUIDs must be spatially exclusive of each other.

The basic edit procedure is:

- User creates a new feature in edit shapefile
- This feature is used in a spatial select to grab any features from live data which it overlaps
- The user edits this data so that all features are topologically sound and have attributes
- The data is committed (pretty much just saving the shapefile edits)
- An admin user then needs to approve them. When they are approved they will be added back into the live data.
- Any features superseded in the live data are added to another FC which is used to record the history of changes.

Anyway, this was working fine up until about 24 hours ago when for some reason the copy/paste commands (straight call to the arcmapID) stopped working. When I segmented the code I found the Copy button on the standard toolbar in ArcMap is grayed out (a feature selection does exist (seen in the attribute table, TOC and as a highlighted feature on the map), it is from 1 layer only and a valid target is set in the editor). If I get the select tool and manually select a feature it becomes enabled again. Can anyone see anything in my code which could account for this? Have I accidentally changed something in the mxd which could have done this?

P.S on a further note, upon running my code it appears that the contents of the function are somehow getting displayed in the dataview as a text element (see attached screen dumps - the little black thing beneath 'pSF = New SpatialFilter' is my data and also you can see that the text is straight out of the Sub shown in VS on the other screen). I have no idea how this came to be. Could it be a glitch??

Thanks in Advance, I really appreciate any help.
0 Kudos
2 Replies
GinoMellino
Occasional Contributor
Upon playing around with this code a bit further I have realised that the Copy command/button is not working but however the paste is. The text element originates from the paste command dumping whatever is in the clipboard onto the map.

I still have no idea why the copy command is failing however. Any ideas?
0 Kudos
TapasNahak
New Contributor

Select the feature before copying.

0 Kudos