Jump to content

Deleting sections of a CFG with MM


MiscelanousItem

Recommended Posts

which section?

yes you can - just need a '-' or '!' in front of what you want to delete:

example:

@PART[xyzpart]
{
   !MODULE[ModuleAnimateGeneric] {}
}

will delete the first ModuleAnimateGeneric it finds in a part.cfg (or another .cfg)

If there is multiple of the same module, you can delete by index, :HAS, or other

@PART[xyzpart]
{
   !MODULE[ModuleAnimateGeneric],5 {}
  // deletes the 6th (0,1,2,3,4,5)
}

@PART[xyzpart]
{
   !MODULE[ModuleAnimateGeneric],* {}
  // deletes all
}
@PART[xyzpart]
{
   !MODULE[ModuleAnimateGeneric]:HAS[#name[jeb]] {}
  // deletes the ModuleAnimateGeneric that has name = jeb
}

/YMMV/: I wrote these in situ, without testing, from memory, while drinking Jeb's Coffee, while eating Jeb's Scones, while sleep deprived, under deadline, while under enormous deadlines. ie - the syntax might need some work, but the basic premise(s) should be sound.

Edited by zer0Kerbal
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...