Ungroup selected items, and then remove them

Hello!

I have a code which removes the tags (if there are tags) of objects and then delete them.

The problem is so marked objects are grouped. Or objects grouped in another group.

I need to unlink the selected objects and then close and delete.

How can I do this?

My current code:

for (var iSel = app.activeDocument.selection.length-1; iSel >=0 ; iSel--){
     var currentSelection = app.selection[iSel];
          if (currentSelection.associatedXMLElement != null) {
               currentSelection.associatedXMLElement.untag();
               currentSelection.remove();
          }
          else {
               currentSelection.remove();
          }
}


You can work with the property "allPageItems" for each selected object and removes the thiese brand first.
Later you could delete all of the items selected, if you really must.

Also locked points, if you wish.

Code:

var sel = app.selection;

//UNTAG ALL SELECTED ITEMS:
for(var n=0;n=0;n--){

    //LOCKED ITEMS WILL BE UNLOCKED:
    if(sel[n].locked){sel[n].locked = false};

    //THEN DELETED:
    sel[n].remove();

    };

Uwe

Tags: InDesign

Similar Questions

  • How to transfer photos from my iPhone to my iPad, put them in albums and then remove them from my iPhone

    How to transfer photos from my iPhone to my iPad, put them in albums and then remove them from my iPhone

    There are several methods.

    You could make a start by looking at this article.

  • Garbage Vs all select all and then remove

    In mail, there is now an option in the trash all that is very useful.

    However, I keep the emails in my Inbox for any future reference. If I get new emails I want to the trash and use the option all rubbish, he trashes not only new emails, but also e-mails I saved. I guess that there is still no option to select all, then trash. Currently, I'm going to edit mode and manually select each email and then trash. All that I'm missing?

    Thank you.

    Shawn

    srmsrm wrote:

    In mail, there is now an option in the trash all that is very useful.

    However, I keep the emails in my Inbox for any future reference. If I get new emails I want to the trash and use the option all rubbish, he trashes not only new emails, but also e-mails I saved. I guess that there is still no option to select all, then trash. Currently, I'm going to edit mode and manually select each email and then trash. All that I'm missing?

    Thank you.

    Shawn

    Trash everything or select everything would be the same, it will remove all your e-mail.

    You will need to manually select the emails you want to remove, then emails you don't want deleted.

  • My iCloud is full and I would like to spend on 5000photos on the hard drive and then remove them to iCloud.  How do you do that?

    My iCloud is full and I want to transfer most of my 5000 images in the cloud on the hard drive on my iMac which is about 10% of storage capacity.  How can I do this?  Thank you

    1. Photos > Preferences > iCloud > iCloud (original Dungeon) photo library
    2. Wait for them to download

    If you want to remove the cloud, you can do two things:

    System Preferences > iCloud > manage > photo library > remove and disable

    or

    iCloud.com > pictures (select and delete)

    Please note, however, if you enable iCloud library again at any time in the future on your Mac, all the photos on your Mac will download again. You may find that buying more space iCloud is the best answer for you.

  • Found the names not allowed on my contacts Hotmail list and cannot remove them (they do NOT appear when I look at 'Contacts')

    Found not authorized names on my Hotmail Contact list and cannot remove them (they do NOT appear when I look at 'Contacts'), but are present if I send a new email by clicking on the button 'A' and selecting 'all '. Any suggestions on how to remove the unauthorized names?

    Submit all Hotmail queries on the forum right here:

    Windows Live Solution Center
    http://windowslivehelp.com/

  • How to ensure that my computer has microphones and then use them for talking to Cortana?

    How to ensure that my computer has microphones and then use them for talking to Cortana?

    Hi Walter,

    Please start by http://windows.microsoft.com/en-us/windows-10/cortana-privacy-faq

    Also, try to review this tutorial: http://www.tenforums.com/tutorials/4026-cortana-turn-off-windows-10-a.html

    They should help you get started.  Problems specific to the micro (existence, activation, volume,...) will be addressed (more than the troubleshooting steps if Cortana doesn't) that you go through the above; However, a "one-stop-shop" for microphones & recognition recording & speech covering all peripheral aspects are versatile control panel page (see the path in the blue header at the top of the screenshot pictured below for W10Pro 11102).

    Best wishes

    Kosh

  • error 'Unable to write' 1x10001c30 address error message at shutdown began after you download Explorer 8 and then remove Explorer 8.

    "Write failed" error message during shutdown began after you download Explorer 8 and then remove Explorer 8. How can I get rid of him?

    Thank you, Matthew. I have eliminated the error message by reinstalling Explorer 8. I'll leave on my computer and the problem is solved.

  • If I drag and drop a program of (F) and (C) and then remove the program on (F)?

    If I drag and drop a program of (F) and (C) and then remove the program on (F)?

    It is called: C_Drive.V21, there 2 905 088 KB.
    I have no idea what it is or does, but I'm trying free space on disk (F), so can I remove the disk (F) it?

    It is not "a program".  Assuming that the last character is actually a tiny 'eye' (i) instead of a number 1, it's a Symantec Ghost image file (some versions).  Do you use ghosts?  Have you used the ghost?

    If you still have Ghost installed, you can probably use to investigate on what is in the file.

    Check the date of the file.  If it's an image of your C drive for a long time, maybe you don't need more.

  • Can I move my files on my D drive and then use them to reinstall once I have upgraded to Windows7

    I am running Vista and want to upgrade to Windows 7.  I have two hard drives on my computer, C, and D.  Can I use D to store my files while I install Windows7 and then move them back on the C drive?

    Hello

    You should always have backups of files in case of hard drive failure and also before major upgrade work, etc.

    See you soon.

  • Is it possible to group objects, which are placed in the project and then hide them with line a single action-script? THX in advance, Philip

    I work in CP 9 and I'm going to try the following: the user must be able to make ALL invisible or visible to highlight boxes by clicking on the corresponding button on the first page layout. Thus, for example, if the user does not want the highlight boxes appear, click on "Hide the boxes" and boxes are hidden for the rest of the project. I managed to get to this point for help... but it is still a lot of work for me to manually enter all the different names of these boxes in the action-script. So my question is: is it possible to group objects, which are placed in the project and then hide them with line a single action-script? THX in advance, Philip

    Actually... releasing the CpExtra HTML5 widget, it will be possible.

    It has a function called @syntax that allows you to perform an action (for example HIDE) automatically on any object throughout a project of Cp9 simply based on the name of the object.

    So for example, if you named all the boxes to highlight you want hidden this way to have the suffix _HideMe and you say CpExtra you want all of them hidden if a user variable is assigned to a certain value, then that is what will happen.

    That's the good news.  The bad news is that the widget is still in BETA final tests at the moment, so you may need to wait a bit before you can realize your idea.

  • Need help to open two images with the same file with different exposures on the screen at the same time in the Photoshop creative cloud (in previous versions we could open two images of the same nef (raw) file and then combine them on the screen with the

    Need help to open two images with the same file with different exposures on the screen at the same time in the Photoshop creative cloud (in previous versions we could open two images of the same nef (raw) file and then combine them on the screen with the move tool. They have become a composite of two layers which could be developed further with the mask tool.

    Hello

    Please go to the preferences > workspace and uncheck the option 'open the document in the tabs '.

    Now you can click on file and choose file > open and open the two images in two different windows which can be arranged side by side.

    Thank you

  • Hi, well, I want to get the creative cloud cuz I need for my career as urgent, but I will change my phone soon, so my question is... can I install in my pc, and then move them to another without paying again or something?

    Hi, well, I want to get the creative cloud cuz I need for my career as urgent, but I will change my phone soon, so my question is... can I install in my pc, and then move them to another without paying again or something?

    Yes.

    You can install an unlimited number of computers.  You can connect to up to two computers at any time (and you must be connected to use your cc programs).

    It's quick and easy to sign in and out, so there is no downside on the use of the cc on different computers.  legally, only the licensee is authorized to use the subscription of the cc if you can't share your programs with another person, but this is the only restriction.

    you have just installed you are the application of cc desktop on any computer you use, Download Adobe Creative Cloud apps | CC free trial Adobe

    Connect, connect and disconnect activate Cloud Creative applications

    Use the desktop application to install your programs of cc.

  • I don't understand.  I use Google Docs to write letters and other shapes, and then convert them to PDF format using Adobe Acrobat.  If firm forms Central, I will still be able to do this?

    I don't understand.  I use Google Docs to write letters and other shapes, and then convert them to PDF format using Adobe Acrobat.  If firm forms Central, I will still be able to do this?

    No, if you do not use FormsCentral its disappearance will not affect you.

  • Reading lines and then comparing them

    Hello

    I want to read two lines of a file, and then compare them. At the present time, I have implemented:
    String line = null;
    String currentLine = null;
    String prevLine = null;
    
    BufferedReader bf = new BufferedReader(new FileReader(fileA));
    while ((line=bf.readLine()) != null)
            {    
                currentLine = line;
                prevLine = line;
            }
    I understand that this code returns the same line, but I was just hoping that maybe someone could point me in the right direction. Thanks in advance.
    prevLine = currentLine;
    currentLine = line;
    

    Be sure to check for null in the comparison.

    DB

  • I want to get rid of the Bing screen, but there is no "menu at the top of the Firefox window" for me "Select tools and then select the Add-ons menu item.

    I suddenly have a 'Bing' screen when I connect on Firefox - and I want to get rid of it. The support section of Firefox says
    1 "in the menu at the top of the Firefox window, seledt tools, and then select the Add-ons menu item." - but I don't see any 'menu item' tools, or much less modules.
    2. "in the window modules, click the Extensions Panel"- but how to find the Modules window?
    3. find the Bing and extended support to search toolbar in the list and then click on disable for each of them. ' - but what and where exactly is - this?

    At the top of the screen is only an icon of Yahoo to the left and to the right of it, a search box, 'Web search', 'My Apps,' Yellow Pages,""Weather","Updates"and"Skype ". to the right of the people, there is a green cross saying "add more applications. to your toolbar"and to the right of this one kind of gear shift looking icon saying"toolbar settings ".
    So, in short, how can I get rid of the Bing screen and how to access these tools?
    Thank you.

    Versions of Firefox 3.6 + have a feature to allow the user to hide the Menu bar.

    Press the Alt key to temporarily show the Menu bar, then open view > toolbars and select menu bar, so it has a check mark.

    The F10 can also be used on most PCs to temporarily reveal the menu bar.

    https://support.Mozilla.com/en-us/KB/menu+bar+is+missing

Maybe you are looking for

  • Satellite A100-TA2 PSAA8C-TA202C has internal BT?

    I remember when buying laptop he had supposedly BTDoes anyone know if my laptop has built-in modules of bt / radio? Satellite A100-TA2 system unitModel PSAA8C-TA202C number Also, anyone know what is the model of "Toshiba" of this laptop... A100-TA2 i

  • X 220-unable to update BIOS

    Greetings I can't update the BIOS on the Thinkpad listed below. I tried to run the CD version of starting the program update (using the CD player in dock), and it reports the error: "The system file is not correct for this system. Windows BIOS update

  • A small question about the replacement of the DVD in a HP Pavilion dv6 - 2057cl

    I need to replace the DVD drive in this dv6, and I wonder if there is room for manoeuvre with regard to the replacement drive.  Can I use another drive to disc HP with a similar model # or am I limited on drive 'identical '? Some quick info follows:

  • WRT110 - strange problem

    Well, I hope he has some ideas out there. I have a strange situation with a friend. 2 laptops- Toshiba - Win 7 x 64 - Home Edition - IP 192.168.1.104 PowerBook G4 MAC OS 10.4.11 - IP address 192.168.1.101 Router WRT110 If the Toshiba is on, it will c

  • VDP - small discs of data

    HelloCan someone tell me if it is possible to deploy POS with smaller disks (less then 256 GB)?For the data disks 3 x 256 GB of my lab at home is a real waste of space, and I've even not so much to do.I used VMware Data Recovery, but I have upgraded