Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. VS2008 Custom Rules: Can I run two rules on one input file?

VS2008 Custom Rules: Can I run two rules on one input file?

Scheduled Pinned Locked Moved C / C++ / MFC
question
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jonathan Davies
    wrote on last edited by
    #1

    Can I run two command line instructions on a file in a VS2008 project? I can set each command line instruction up as a rule in the .rules file (see below) but can only select one rule or the other not both. From the input files properties in VS2008 Project View I can select GraphVizSVGRule or GraphVizPNGRule. I want to create both a .svg file and a .png file from the input .gv file (GraphViz)

    L 1 Reply Last reply
    0
    • J Jonathan Davies

      Can I run two command line instructions on a file in a VS2008 project? I can set each command line instruction up as a rule in the .rules file (see below) but can only select one rule or the other not both. From the input files properties in VS2008 Project View I can select GraphVizSVGRule or GraphVizPNGRule. I want to create both a .svg file and a .png file from the input .gv file (GraphViz)

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      The only method I have found to run more than one is to create a command script that accepts parameters, so you can pass in the file and directory names.

      Use the best guess

      J 1 Reply Last reply
      0
      • L Lost User

        The only method I have found to run more than one is to create a command script that accepts parameters, so you can pass in the file and directory names.

        Use the best guess

        J Offline
        J Offline
        Jonathan Davies
        wrote on last edited by
        #3

        Thanks, it's now working with the below as you suggested. Rule that calls batch file:

        Batch file that creates svg and png from GraphViz gv file:

        echo off
        set "p=%~dps1"
        set "px=Images\"
        set "newp=%p%%px%"
        set "newsvg=%newp%%~n1%.svg"
        set "newpng=%newp%%~n1%.png"
        set "source=%~s1"
        echo Creating svg...
        dot.exe -T svg %source% -o %newsvg%
        echo Creating png...
        dot.exe -T png %source% -o %newpng%

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups