Output Mapping Preference for 5.1 Audio

Hello,
I have my editing hardware hooked up to a surround sound processor (via HDMI) which feeds 7.1/5.1 speakers and an HDTV.  The HDTV displays the output monitor content just fine, but I have been unable to get Premiere Pro CC 2014 to output 5.1 sound for real-time preview.  Everything keeps getting downmixed to stereo.
Here's what I have for my Audio Preferences:
Here's what I have for the Output Mapping Preferences:  (Not sure why I don't have 6 channels to choose from here.)
If I click on the ASIO Settings button, this is what I get:
Even the NVidia 880M HDMI Specifications show that surround sound is available via HDMI:
I am able to watch 7.1 Blu-Rays from this computer and the surround sound processor has no trouble processing it.  I am able to test the audio using the Windows Audio settings and it plays 5.1 or 7.1 just fine.
So, why can't I get Premiere Pro to output 5.1 discrete audio during real-time playback?  Why am I being forced to Map the Output to only 2 channels?
Thanks for any help you can provide!

When plugged into the Denon Surround Sound Receiver via HDMI, it looks like this:
When I click on "Open Windows Sound settings..." I get this:
When I click on the DENON-AVR-4 device and then the "Configure" button, I get this and everything tests out fine (each speaker test plays the test sound in the correct speaker:
Here's what the surround sound receiver shows:

Similar Messages

  • Output channel mapping problem for surround encoder

    vista 64 bit
    sound blaster titanium x-fi sound card
    logitech 5.1 speaker set up
    hello, i am trying to mix a movie i made into 5.1. when i open the surround encoder, go to the audio hardware setup and try to set my output channel mapping i only get two speakers. i have a card that supports 5.1, 5.1 speakers, and get surround sound when i play a DVD. yet audition only recognizes my left and right speaker. any help on how i get my output channel mapping set correctly?
    thanks in advance!

    Thank you for the info, though I admit I'm still a bit confused.
    My card is a creative x-fi extreme gamer.  It has 3 line out jacks and one line in jack.  T  Oh, here it is in the manual...thats just not good enough.
    But what is the surround encoder dialog box doing, if not encoding surround mixes?  The manual says I can exportsurround sound from a multitrack session. 
    Date: Mon, 1 Jun 2009 21:58:08 -0600
    From: [email protected]
    To: [email protected]
    Subject: output channel mapping problem for surround encoder

  • Activity looping/parallel for each: Output mapping and Inturrupting

    Hello,
    we want to model and execute an approval process with one requestor and several approvers. All assigned approvers get the approval task simultaniously to save time. Each approver can make a decision like Reject, Rework, Approve and also add comments.
    Only if all Assignees make their approval, the request gets approved. On the first occuring "rework" or "reject" decision, all open tasks have to be removed from the assignees UWLs; their results become unnnecessary.
    Please have a look at the corresponding model on [http://www.gm.fh-koeln.de/~wi1744/pubfiles/parallel_for_each_task.PNG].
    As you can see in the model, we made an approach using a parallel for each Human activity. In our process the tasks show up in parallel on each adressed UWL. Thats fine so far but we are facing two problems.
    1. Output Mapping of parallel Tasks
    1.1 Are we right to assume that for each task output the activitys output mapping is done?
    1.2 Are there differences to the regular output mapping we have to consider?
    2. Stopping the parallel tasks and continuing the process flow .
    We said as soon as any result like rework or reject comes out, the whole activity should stop and all open tasks be removed from the UWL. How can this be modeled and realised?
    Thank you for any input!

    Hi ,
    For the 2nd question you can achieve that behavior  using "Intermediate message events". I have created a dummy process [http://imageshack.us/photo/my-images/24/sdn1.png/] by which you can achieve this. Hope this helps. For the 1st question can you please be more specific about what is it you wanted to do. 
    Thanks & Regards,
    Rohit

  • Can I convert the optical output to analog for a zone 2 audio? I would continue using the HDMI for the main zone. Can I use both of these simultaneously? Zone 2 only supports analog on this receiver.

    Can I convert the optical output to analog via a converter for  zone 2 audio? I would continue using the HDMI for the main zone. Can I use both of these simultaneously? Zone 2 only supports analog on this receiver.

    These will probably help.
    [http://www.jsresources.org/examples/audio_conversion.html]

  • Can I set a default Playback preference for multiple users on same PC?

    I am setting up an editing suite for our University which has a "per machine" Creative Cloud licence. It is a PC installation. This machine will be used by a class of students who will log in with their own credentials. I need to set the preferences for Premiere (video output, workspace layout, default drives etc) so that it will be the same for all users logging in since we want a consistent setup for teaching purposes and dont want to have to help each student set up so that it shows correctly on the monitors. Is there a way of saving this setting as the default for every user?  In particular, as we have dual monitors, we want to save the preferences - Playback to always appear on the second monitor. This is really important for us - I need an answer before building more suites.
    (Adobe won't let me ask them directly, so I have to wait for someone to provide an anwser on the forums... not great customer support in my book)

    Firstly...is  this editing suite for the purpose of teaching editing or something else?
    Next ...what is your experience with PPRo?
    You can set up the machine(s) initially exactly how you want them  in regards to hardware and screen layouts etc.  Thats easy and can be called..'University of Waikato Default Edit Workspace' for example. That is  only part of it though.
    You can set up and share a common Key Board Short cut Preference File.  Same as Export Presets.
    There is no way you can "Default" all the USERS stuff for individual unique projects  though without creating a massive potential for disaster and confusion.
    Each will need to have access to many separate drive locations for their media (audio, graphics, footage) and the knowledge to create, access and locate it.
    THey will each need a separate Location for their Projects as well as their media.
    If they are editing students...they should be taught how to set up everything for themselves so they have an understanding of the fundamentals and basic s of NLEs

  • Auidio output mapping won't work CS6 Mac

    I'm having trouble changing the audio output mapping in premiere cs6 on a Mac Pro.
    I have a usb headset for short term use that I want to set up. I go to the menu I can change it, and the headset shows up, and I can select it, but clicking "ok" doesn't save it. I can listen to audio fine thru everything else on my computer with this headset. I can't even get the audio output mapping to make sound with the built in speakers (not ideal for sound, but I'd take it for now)
    Any help or ideas would be greatly appreciated. Anything I can offer for more info, please ask. Thanks!

    crazy, I'm having the exact same issue on the same day, only my issue is I keep setting my audio mapping to my wireless headphones (bluetooth) and click OK but it doesn't work. When I re open audio mapping prefs its set back to the default.
    jesse

  • DO i need some extra hardware interface for receving both Audio and video

    hi i m doing e-learning project. i have to capture video from webcam and voice from headphone and send to client.
    but my code is working fine for either one at a time.
    DO i need some extra hardware interface for receving both Audio and video. im using code AVTransmit and AVReceive found from this site only
    After running TX
    i give Dsound:// & vfw://0 in Media Locater only sound is received and no vedio
    and when i give vfw://0 in Media Locater only live video is transmited.
    im using JMF1.1.2e.
    if any one know the method to run or cause of it plz reply me soon. i will be very thankfull
    transmiter/server side code .first run TX on server
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.net.*;
    import java.util.*;
    import javax.media.rtp.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.border.*;
    public class Tx extends JFrame implements ActionListener, KeyListener,
    MouseListener, WindowListener {
    Vector targets;
    JList list;
    JButton startXmit;
    JButton rtcp;
    JButton update;
    JButton expiration;
    JButton statistics;
    JButton addTarget;
    JButton removeTarget;
    JTextField tf_remote_address;
    JTextField tf_remote_data_port;
    JTextField tf_media_file;
    JTextField tf_data_port;
    TargetListModel listModel;
    AVTransmitter avTransmitter;
    RTCPViewer rtcpViewer;
    JCheckBox cb_loop;
    Config config;
    public Tx() {
    setTitle( "JMF/RTP Transmitter");
         config= new Config();
         GridBagLayout gridBagLayout= new GridBagLayout();
         GridBagConstraints gbc;
         JPanel p= new JPanel();
         p.setLayout( gridBagLayout);
         JPanel localPanel= createLocalPanel();
         gbc= new GridBagConstraints();
         gbc.gridx= 0;
         gbc.gridy= 0;
         gbc.gridwidth= 2;
         gbc.anchor= GridBagConstraints.CENTER;
         gbc.fill= GridBagConstraints.BOTH;
         gbc.insets= new Insets( 10, 5, 0, 0);
         ((GridBagLayout)p.getLayout()).setConstraints( localPanel, gbc);
         p.add( localPanel);
         JPanel targetPanel= createTargetPanel();
         gbc= new GridBagConstraints();
         gbc.gridx= 1;
         gbc.gridy= 1;
         gbc.weightx= 1.0;
         gbc.weighty= 1.0;
         gbc.anchor= GridBagConstraints.CENTER;
         gbc.fill= GridBagConstraints.BOTH;
         gbc.insets= new Insets( 10, 5, 0, 0);
         ((GridBagLayout)p.getLayout()).setConstraints( targetPanel, gbc);
    p.add( targetPanel);
         JPanel mediaPanel= createMediaPanel();
         gbc= new GridBagConstraints();
         gbc.gridx= 1;
         gbc.gridy= 2;
         gbc.weightx= 1.0;
         gbc.weighty= 1.0;
         gbc.anchor= GridBagConstraints.CENTER;
         gbc.fill= GridBagConstraints.BOTH;
         gbc.insets= new Insets( 10, 5, 0, 0);
         ((GridBagLayout)p.getLayout()).setConstraints( mediaPanel, gbc);
    p.add( mediaPanel);
    JPanel buttonPanel= new JPanel();
    rtcp= new JButton( "RTCP Monitor");
    update= new JButton( "Transmission Status");
         update.setEnabled( false);
         rtcp.addActionListener( this);
         update.addActionListener( this);
         buttonPanel.add( rtcp);
         buttonPanel.add( update);
         gbc= new GridBagConstraints();
         gbc.gridx = 0;
         gbc.gridy = 3;
    gbc.gridwidth= 2;
         gbc.weightx = 1.0;
         gbc.weighty = 0.0;
         gbc.anchor = GridBagConstraints.CENTER;
         gbc.fill = GridBagConstraints.HORIZONTAL;
         gbc.insets = new Insets( 5,5,10,5);
         ((GridBagLayout)p.getLayout()).setConstraints( buttonPanel, gbc);
         p.add( buttonPanel);
    getContentPane().add( p);
         list.addMouseListener( this);
         addWindowListener( this);
    pack();
    setVisible( true);
    private JPanel createMediaPanel() {
    JPanel p= new JPanel();
         GridBagLayout gridBagLayout= new GridBagLayout();
    GridBagConstraints gbc;
         p.setLayout( gridBagLayout);
         JLabel label= new JLabel( "Media Locator:");
         gbc= new GridBagConstraints();
         gbc.gridx = 0;
         gbc.gridy = 0;
         gbc.weightx = 0.0;
         gbc.weighty = 0.0;
         gbc.anchor = GridBagConstraints.EAST;
         gbc.fill = GridBagConstraints.NONE;
         gbc.insets = new Insets( 5,5,10,5);
         ((GridBagLayout)p.getLayout()).setConstraints( label, gbc);
         p.add( label);
         tf_media_file= new JTextField( 35);
         gbc= new GridBagConstraints();
         gbc.gridx = 1;
         gbc.gridy = 0;
         gbc.weightx = 1.0;
         gbc.weighty = 0.0;
         gbc.anchor = GridBagConstraints.WEST;
         gbc.fill = GridBagConstraints.HORIZONTAL;
         gbc.insets = new Insets( 5,5,10,5);
         ((GridBagLayout)p.getLayout()).setConstraints( tf_media_file, gbc);
         p.add( tf_media_file);
         tf_media_file.setText( config.media_locator);
         cb_loop= new JCheckBox( "loop");
         startXmit= new JButton( "Start Transmission");
         startXmit.setEnabled( true);
         startXmit.addActionListener( this);
         gbc= new GridBagConstraints();
         gbc.gridx = 2;
         gbc.gridy = 0;
         gbc.weightx = 0.0;
         gbc.weighty = 0.0;
         gbc.anchor = GridBagConstraints.WEST;
         gbc.fill = GridBagConstraints.NONE;
         gbc.insets = new Insets( 5,5,10,5);
         ((GridBagLayout)p.getLayout()).setConstraints( cb_loop, gbc);
         p.add( cb_loop);
         cb_loop.setSelected( true);
         cb_loop.addActionListener( this);
         gbc= new GridBagConstraints();
         gbc.gridx = 1;
         gbc.gridy = 1;
         gbc.weightx = 0.0;
         gbc.weighty = 0.0;
         gbc.anchor = GridBagConstraints.CENTER;
         gbc.fill = GridBagConstraints.NONE;
         gbc.insets = new Insets( 5,5,10,5);
         ((GridBagLayout)p.getLayout()).setConstraints( startXmit, gbc);
         p.add( startXmit);
         TitledBorder titledBorder= new TitledBorder( new EtchedBorder(), "Source");
         p.setBorder( titledBorder);
         return p;
    private JPanel createTargetPanel() {
    JPanel p= new JPanel();
         GridBagLayout gridBagLayout= new GridBagLayout();
    GridBagConstraints gbc;
         p.setLayout( gridBagLayout);
         targets= new Vector();
         for( int i= 0; i < config.targets.size(); i++) {
         targets.addElement( config.targets.elementAt( i));
    listModel= new TargetListModel( targets);
    list= new JList( listModel);
         list.addKeyListener( this);
         list.setPrototypeCellValue( "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
    JScrollPane scrollPane= new JScrollPane( list,
    ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
    ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
         gbc= new GridBagConstraints();
         gbc.gridx= 0;
         gbc.gridy= 0;
         gbc.weightx= 1.0;
         gbc.weighty= 1.0;
         gbc.anchor= GridBagConstraints.CENTER;
         gbc.fill= GridBagConstraints.BOTH;
         gbc.insets= new Insets( 10, 5, 0, 0);
         ((GridBagLayout)p.getLayout()).setConstraints( scrollPane, gbc);
         p.add( scrollPane);
    JPanel p1= new JPanel();
         p1.setLayout( gridBagLayout);
         JLabel label= new JLabel( "IP Address:");
         gbc= new GridBagConstraints();
         gbc.gridx = 0;
         gbc.gridy = 0;
         gbc.weightx = 0.0;
         gbc.weighty = 0.0;
         gbc.anchor = GridBagConstraints.EAST;
         gbc.fill = GridBagConstraints.NONE;
         gbc.insets = new Insets( 5,5,0,5);
         ((GridBagLayout)p1.getLayout()).setConstraints( label, gbc);
         p1.add( label);
         tf_remote_address= new JTextField( 15);
         gbc= new GridBagConstraints();
         gbc.gridx = 1;
         gbc.gridy = 0;
         gbc.weightx = 0.0;
         gbc.weighty = 0.0;
         gbc.anchor = GridBagConstraints.WEST;
         gbc.fill = GridBagConstraints.NONE;
         gbc.insets = new Insets( 5,5,0,5);
         ((GridBagLayout)p1.getLayout()).setConstraints( tf_remote_address, gbc);
         p1.add( tf_remote_address);
         label= new JLabel( "Data Port:");
         gbc= new GridBagConstraints();
         gbc.gridx = 0;
         gbc.gridy = 1;
         gbc.weightx = 0.0;
         gbc.weighty = 0.0;
         gbc.anchor = GridBagConstraints.EAST;
         gbc.fill = GridBagConstraints.NONE;
         gbc.insets = new Insets( 5,5,0,5);
         ((GridBagLayout)p1.getLayout()).setConstraints( label, gbc);
         p1.add( label);
         tf_remote_data_port= new JTextField( 15);
         gbc= new GridBagConstraints();
         gbc.gridx = 1;
         gbc.gridy = 1;
         gbc.weightx = 0.0;
         gbc.weighty = 0.0;
         gbc.anchor = GridBagConstraints.WEST;
         gbc.fill = GridBagConstraints.NONE;
         gbc.insets = new Insets( 5,5,0,5);
         ((GridBagLayout)p1.getLayout()).setConstraints( tf_remote_data_port, gbc);
         p1.add( tf_remote_data_port);     
    JPanel p2= new JPanel();
    addTarget= new JButton( "Add Target");     
    removeTarget= new JButton( "Remove Target");
         p2.add( addTarget);
         p2.add( removeTarget);
         addTarget.addActionListener( this);
         removeTarget.addActionListener( this);
         gbc= new GridBagConstraints();
         gbc.gridx = 0;
         gbc.gridy = 2;
         gbc.weightx = 1.0;
         gbc.weighty = 0.0;
         gbc.gridwidth= 2;
         gbc.anchor = GridBagConstraints.CENTER;
         gbc.fill = GridBagConstraints.HORIZONTAL;
         gbc.insets = new Insets( 20,5,0,5);
         ((GridBagLayout)p1.getLayout()).setConstraints( p2, gbc);
         p1.add( p2);
         gbc= new GridBagConstraints();
         gbc.gridx= 1;
         gbc.gridy= 0;
         gbc.weightx= 1.0;
         gbc.weighty= 1.0;
         gbc.anchor= GridBagConstraints.CENTER;
         gbc.fill= GridBagConstraints.BOTH;
         gbc.insets= new Insets( 10, 5, 0, 0);
         ((GridBagLayout)p.getLayout()).setConstraints( p1, gbc);
         p.add( p1);
         TitledBorder titledBorder= new TitledBorder( new EtchedBorder(), "Targets");
         p.setBorder( titledBorder);
         return p;
    private JPanel createLocalPanel() {
    JPanel p= new JPanel();
         GridBagLayout gridBagLayout= new GridBagLayout();
    GridBagConstraints gbc;
         p.setLayout( gridBagLayout);
         JLabel label= new JLabel( "IP Address:");
         gbc= new GridBagConstraints();
         gbc.gridx = 0;
         gbc.gridy = 0;
         gbc.weightx = 0.0;
         gbc.weighty = 0.0;
         gbc.anchor = GridBagConstraints.EAST;
         gbc.fill = GridBagConstraints.NONE;
         gbc.insets = new Insets( 5,5,0,5);
         ((GridBagLayout)p.getLayout()).setConstraints( label, gbc);
         p.add( label);
         JTextField tf_local_host= new JTextField( 15);
         gbc= new GridBagConstraints();
         gbc.gridx = 1;
         gbc.gridy = 0;
         gbc.weightx = 0.0;
         gbc.weighty = 0.0;
         gbc.anchor = GridBagConstraints.WEST;
         gbc.fill = GridBagConstraints.NONE;
         gbc.insets = new Insets( 5,5,0,5);
         ((GridBagLayout)p.getLayout()).setConstraints( tf_local_host, gbc);
         p.add( tf_local_host);
         try {
    String host= InetAddress.getLocalHost().getHostAddress();     
         tf_local_host.setText( host);
         } catch( UnknownHostException e) {
         label= new JLabel( "Data Port:");
         gbc= new GridBagConstraints();
         gbc.gridx = 0;
         gbc.gridy = 1;
         gbc.weightx = 0.0;
         gbc.weighty = 0.0;
         gbc.anchor = GridBagConstraints.EAST;
         gbc.fill = GridBagConstraints.NONE;
         gbc.insets = new Insets( 5,5,0,5);
         ((GridBagLayout)p.getLayout()).setConstraints( label, gbc);
         p.add( label);
         tf_data_port= new JTextField( 15);
         gbc= new GridBagConstraints();
         gbc.gridx = 1;
         gbc.gridy = 1;
         gbc.weightx = 0.0;
         gbc.weighty = 0.0;
         gbc.anchor = GridBagConstraints.WEST;
         gbc.fill = GridBagConstraints.NONE;
         gbc.insets = new Insets( 5,5,10,5);
         ((GridBagLayout)p.getLayout()).setConstraints( tf_data_port, gbc);
         p.add( tf_data_port);
         tf_data_port.setText( config.local_data_port);
         TitledBorder titledBorder= new TitledBorder( new EtchedBorder(), "Local Host");
         p.setBorder( titledBorder);
         return p;
    public void actionPerformed( ActionEvent event) {
    Object source= event.getSource();
         if( source == addTarget) {
         String ip= tf_remote_address.getText().trim();
         String port= tf_remote_data_port.getText().trim();
         String localPort= tf_data_port.getText().trim();
         addTargetToList( localPort, ip, port);
         if( avTransmitter != null) {
         avTransmitter.addTarget( ip, port);
         } else if( source == removeTarget) {
         int index= list.getSelectedIndex();
         if( index != -1) {
              Target target= (Target) targets.elementAt( index);
              if( avTransmitter != null) {
         avTransmitter.removeTarget( target.ip, target.port);
              targets.removeElement( target);
              listModel.setData( targets);          
         } else if( source == startXmit) {
         if( startXmit.getLabel().equals( "Start Transmission")) {          
         int data_port= new Integer( tf_data_port.getText()).intValue();
              avTransmitter= new AVTransmitter( this, data_port);
         avTransmitter.start( tf_media_file.getText().trim(), targets);          
              avTransmitter.setLooping( cb_loop.isSelected());
         startXmit.setLabel( "Stop Transmission");
         } else if( startXmit.getLabel().equals( "Stop Transmission")) {
              avTransmitter.stop();
              avTransmitter= null;
              removeNonBaseTargets();
              listModel.setData( targets);
         startXmit.setLabel( "Start Transmission");          
         } else if( source == rtcp) {
         if( rtcpViewer == null) {
         rtcpViewer= new RTCPViewer();
         } else {
              rtcpViewer.setVisible( true);
              rtcpViewer.toFront();
         } else if( source == cb_loop) {
         if( avTransmitter != null) {
              avTransmitter.setLooping( cb_loop.isSelected());
    private void removeNonBaseTargets() {
         String localPort= tf_data_port.getText().trim();
         for( int i= targets.size(); i > 0;) {
         Target target= (Target) targets.elementAt( i - 1);
         if( !target.localPort.equals( localPort)) {
    targets.removeElement( target);
         i--;
    public void addTargetToList( String localPort,
                             String ip, String port) {     
    ListUpdater listUpdater= new ListUpdater( localPort, ip,
                                  port, listModel, targets);
    SwingUtilities.invokeLater( listUpdater);           
    public void rtcpReport( String report) {
         if( rtcpViewer != null) {
         rtcpViewer.report( report);
    public void windowClosing( WindowEvent event) {
         config.local_data_port= tf_data_port.getText().trim();
         config.targets= new Vector();
         for( int i= 0; i < targets.size(); i++) {
         Target target= (Target) targets.elementAt( i);
         if( target.localPort.equals( config.local_data_port)) {
              config.addTarget( target.ip, target.port);
         config.media_locator= tf_media_file.getText().trim();
         config.write();
    System.exit( 0);
    public void windowClosed( WindowEvent event) {
    public void windowDeiconified( WindowEvent event) {
    public void windowIconified( WindowEvent event) {
    public void windowActivated( WindowEvent event) {
    public void windowDeactivated( WindowEvent event) {
    public void windowOpened( WindowEvent event) {
    public void keyPressed( KeyEvent event) {
    public void keyReleased( KeyEvent event) {
    Object source= event.getSource();
         if( source == list) {
         int index= list.getSelectedIndex();
    public void keyTyped( KeyEvent event) {
    public void mousePressed( MouseEvent e) {
    public void mouseReleased( MouseEvent e) {
    public void mouseEntered( MouseEvent e) {
    public void mouseExited( MouseEvent e) {
    public void mouseClicked( MouseEvent e) {
    Object source= e.getSource();
         if( source == list) {
         int index= list.getSelectedIndex();
         if( index != -1) {
              Target target= (Target) targets.elementAt( index);
              tf_remote_address.setText( target.ip);
              tf_remote_data_port.setText( target.port);
         int index= list.locationToIndex( e.getPoint());
    public static void main( String[] args) {
    new Tx();
    class TargetListModel extends AbstractListModel {
    private Vector options;
    public TargetListModel( Vector options) {
         this.options= options;
    public int getSize() {
         int size;
         if( options == null) {
         size= 0;
         } else {
         size= options.size();
         return size;
    public Object getElementAt( int index) {
    String name;
    if( index < getSize()) {
         Target o= (Target)options.elementAt( index);
    name= o.localPort + " ---> " + o.ip + ":" + o.port;
         } else {
         name= null;
         return name;
    public void setData( Vector data) {
         options= data;
         fireContentsChanged( this, 0, data.size());
    class ListUpdater implements Runnable {
    String localPort, ip, port;
    TargetListModel listModel;
    Vector targets;
    public ListUpdater( String localPort, String ip, String port,
                   TargetListModel listModel, Vector targets) {
         this.localPort= localPort;
         this.ip= ip;
         this.port= port;
         this.listModel= listModel;
         this.targets= targets;
    public void run() {
    Target target= new Target( localPort, ip, port);
         if( !targetExists( localPort, ip, port)) {
         targets.addElement( target);
    listModel.setData( targets);
    public boolean targetExists( String localPort, String ip, String port) {
         boolean exists= false;
         for( int i= 0; i < targets.size(); i++) {
         Target target= (Target) targets.elementAt( i);
         if( target.localPort.equals( localPort)
         && target.ip.equals( ip)
              && target.port.equals( port)) {          
              exists= true;
         break;
         return exists;
    >>>>>>>>>>>>>>>>>
    import java.awt.*;
    import java.io.*;
    import java.net.InetAddress;
    import java.util.*;
    import javax.media.*;
    import javax.media.protocol.*;
    import javax.media.format.*;
    import javax.media.control.TrackControl;
    import javax.media.control.QualityControl;
    import javax.media.rtp.*;
    import javax.media.rtp.event.*;
    import javax.media.rtp.rtcp.*;
    public class AVTransmitter implements ReceiveStreamListener, RemoteListener,
    ControllerListener {
    // Input MediaLocator
    // Can be a file or http or capture source
    private MediaLocator locator;
    private String ipAddress;
    private int portBase;
    private Processor processor = null;
    private RTPManager rtpMgrs[];
    private int localPorts[];
    private DataSource dataOutput = null;
    private int local_data_port;
    private Tx tx;
    public AVTransmitter( Tx tx, int data_port) {
         this.tx= tx;
         local_data_port= data_port;
    * Starts the transmission. Returns null if transmission started ok.
    * Otherwise it returns a string with the reason why the setup failed.
    public synchronized String start( String filename, Vector targets) {
         String result;
         locator= new MediaLocator( filename);
         // Create a processor for the specified media locator
         // and program it to output JPEG/RTP
         result = createProcessor();
         if (result != null) {
         return result;
         // Create an RTP session to transmit the output of the
         // processor to the specified IP address and port no.
         result = createTransmitter( targets);
         if (result != null) {
         processor.close();
         processor = null;
         return result;
         // Start the transmission
         processor.start();
         return null;
    * Use the RTPManager API to create sessions for each media
    * track of the processor.
    private String createTransmitter( Vector targets) {
         // Cheated. Should have checked the type.
         PushBufferDataSource pbds = (PushBufferDataSource)dataOutput;
         PushBufferStream pbss[] = pbds.getStreams();
         rtpMgrs = new RTPManager[pbss.length];
         localPorts = new int[ pbss.length];
         SessionAddress localAddr, destAddr;
         InetAddress ipAddr;
         SendStream sendStream;
         int port;
         SourceDescription srcDesList[];
         for (int i = 0; i < pbss.length; i++) {
         // for (int i = 0; i < 1; i++) {
         try {
              rtpMgrs[i] = RTPManager.newInstance();     
              port = local_data_port + 2*i;
              localPorts[ i]= port;
              localAddr = new SessionAddress( InetAddress.getLocalHost(),
                                  port);
              rtpMgrs.initialize( localAddr);          
              rtpMgrs[i].addReceiveStreamListener(this);
              rtpMgrs[i].addRemoteListener(this);
         for( int k= 0; k < targets.size(); k++) {
              Target target= (Target) targets.elementAt( k);
              int targetPort= new Integer( target.port).intValue();
              addTarget( localPorts[ i], rtpMgrs[ i], target.ip, targetPort + 2*i);
              sendStream = rtpMgrs[i].createSendStream(dataOutput, i);          
              sendStream.start();
         } catch (Exception e) {
              e.printStackTrace();
              return e.getMessage();
         return null;
    public void addTarget( String ip, String port) {
         for (int i= 0; i < rtpMgrs.length; i++) {
         int targetPort= new Integer( port).intValue();
         addTarget( localPorts[ i], rtpMgrs[ i], ip, targetPort + 2*i);
    public void addTarget( int localPort, RTPManager mgr, String ip, int port) {
         try {
         SessionAddress addr= new SessionAddress( InetAddress.getByName( ip),
                                  new Integer( port).intValue());
         mgr.addTarget( addr);
         tx.addTargetToList( localPort + "", ip, port + "");
         } catch( Exception e) {
         e.printStackTrace();
    public void removeTarget( String ip, String port) {
         try {     
         SessionAddress addr= new SessionAddress( InetAddress.getByName( ip),
                                  new Integer( port).intValue());
         for (int i= 0; i < rtpMgrs.length; i++) {
         rtpMgrs[ i].removeTarget( addr, "target removed from transmitter.");
         } catch( Exception e) {
         e.printStackTrace();
    boolean looping= true;
    public void controllerUpdate( ControllerEvent ce) {
         System.out.println( ce);
         if( ce instanceof DurationUpdateEvent) {
         Time duration= ((DurationUpdateEvent) ce).getDuration();
         System.out.println( "duration: " + duration.getSeconds());
         } else if( ce instanceof EndOfMediaEvent) {
         System.out.println( "END OF MEDIA - looping=" + looping);
         if( looping) {
         processor.setMediaTime( new Time( 0));
              processor.start();
    public void setLooping( boolean flag) {
         looping= flag;
    public void update( ReceiveStreamEvent event) {
         String timestamp= getTimestamp();
         StringBuffer sb= new StringBuffer();
         if( event instanceof InactiveReceiveStreamEvent) {
         sb.append( timestamp + " Inactive Receive Stream");
         } else if( event instanceof ByeEvent) {
         sb.append( timestamp + " Bye");
         } else {
         System.out.println( "ReceiveStreamEvent: "+ event);
         tx.rtcpReport( sb.toString());     
    public void update( RemoteEvent event) {     
         String timestamp= getTimestamp();
         if( event instanceof ReceiverReportEvent) {
         ReceiverReport rr= ((ReceiverReportEvent) event).getReport();
         StringBuffer sb= new StringBuffer();
         sb.append( timestamp + " RR");
         if( rr != null) {
              Participant participant= rr.getParticipant();
              if( participant != null) {
              sb.append( " from " + participant.getCNAME());
              sb.append( " ssrc=" + rr.getSSRC());
              } else {
              sb.append( " ssrc=" + rr.getSSRC());
              tx.rtcpReport( sb.toString());
         } else {
         System.out.println( "RemoteEvent: " + event);
    private String getTimestamp() {
         String timestamp;
         Calendar calendar= Calendar.getInstance();
         int hour= calendar.get( Calendar.HOUR_OF_DAY);
         String hourStr= formatTime( hour);
         int minute= calendar.get( Calendar.MINUTE);
         String minuteStr= formatTime( minute);
         int second= calendar.get( Calendar.SECOND);
         String secondStr= formatTime( second);
         timestamp= hourStr + ":" + minuteStr + ":" + secondStr;     
         return timestamp;
    private String formatTime( int time) {     
         String timeStr;
         if( time < 10) {
         timeStr= "0" + time;
         } else {
         timeStr= "" + time;
         return timeStr;
    * Stops the transmission if already started
    public void stop() {
         synchronized (this) {
         if (processor != null) {
              processor.stop();
              processor.close();
              processor = null;
         for (int i= 0; i < rtpMgrs.length; i++) {
         rtpMgrs[ i].removeTargets( "Session ended.");
              rtpMgrs[ i].dispose();
    public String createProcessor() {
         if (locator == null) {
         return "Locator is null";
         DataSource ds;
         DataSource clone;
         try {
         ds = javax.media.Manager.createDataSource(locator);
         } catch (Exception e) {
         return "Couldn't create DataSource";
         // Try to create a processor to handle the input media locator
         try {
         processor = javax.media.Manager.createProcessor(ds);
         processor.addControllerListener( this);     
         } catch (NoProcessorException npe) {
         return "Couldn't create processor";
         } catch (IOException ioe) {
         return "IOException creating processor";
         // Wait for it to configure
         boolean result = waitForState(processor, Processor.Configured);
         if (result == false)
         return "Couldn't configure processor";
         // Get the tracks from the processor
         TrackControl [] tracks = processor.getTrackControls();
         // Do we have atleast one track?
         if (tracks == null || tracks.length < 1)
         return "Couldn't find tracks in processor";
         // Set the output content descriptor to RAW_RTP
         // This will limit the supported formats reported from
         // Track.getSupportedFormats to only valid RTP formats.
         ContentDescriptor cd = new ContentDescriptor(ContentDescriptor.RAW_RTP);
         processor.setContentDescriptor(cd);
         Format supported[];
         Format chosen;
         boolean atLeastOneTrack = false;
         // Program the tracks.
         for (int i = 0; i < tracks.length; i++) {
         Format format = tracks[i].getFormat();
         if (tracks[i].isEnabled()) {
              supported = tracks[i].getSupportedFormats();
              // We've set the output content to the RAW_RTP.
              // So all the supported formats should work with RTP.
              // We'll just pick the first one.
              if (supported.length > 0) {
              if (supported[0] instanceof VideoFormat) {
                   // For video formats, we should double check the
                   // sizes since not all formats work in all sizes.
                   chosen = checkForVideoSizes(tracks[i].getFormat(),
                                       supported[0]);
              } else
                   chosen = supported[0];
              tracks[i].setFormat(chosen);
              System.err.println("Track " + i + " is set to transmit as:");
              System.err.println(" " + chosen);
              atLeastOneTrack = true;
              } else
              tracks[i].setEnabled(false);
         } else
              tracks[i].setEnabled(false);
         if (!atLeastOneTrack)
         return "Couldn't set any of the tracks to a valid RTP format";
         // Realize the processor. This will internally create a flow
         // graph and attempt to create an output datasource for JPEG/RTP
         // audio frames.
         result = waitForState(processor, Controller.Realized);
         if (result == false)
         return "Couldn't realize processor";
         // Set the JPEG quality to .5.
         setJPEGQuality(processor, 0.5f);
         // Get the output data source of the processor
         dataOutput = processor.getDataOutput();
         return null;
    static SessionAddress destAddr1, destAddr2;
    * For JPEG and H263, we know that they only work for particular
    * sizes. So we'll perform extra checking here to make sure they
    * are of the right sizes.
    Format checkForVideoSizes(Format original, Format supported) {
         int width, height;
         Dimension size = ((VideoFormat)original).getSize();
         Format jpegFmt = new Format(VideoFormat.JPEG_RTP);
         Format h263Fmt = new Format(VideoFormat.H263_RTP);
         if (supported.matches(jpegFmt)) {
         // For JPEG, make sure width and height are divisible by 8.
         width = (size.width % 8 == 0 ? size.width :
                        (int)(size.width / 8) * 8);
         height = (size.height % 8 == 0 ? size.height :
                        (int)(size.height / 8) * 8);
         } else if (supported.matches(h263Fmt)) {
         // For H.263, we only support some specific sizes.
         if (size.width < 128) {
              width = 128;
              height = 96;
         } else if (size.width < 176) {
              width = 176;
              height = 144;
         } else {
              width = 352;
              height = 288;
         } else {
         // We don't know this particular format. We'll just
         // leave it alone then.
         return supported;
         return (new VideoFormat(null,
                        new Dimension(width, height),
                        Format.NOT_SPECIFIED,
                        null,
                        Format.NOT_SPECIFIED)).intersects(supported);
    * Setting the encoding quality to the specified value on the JPEG encoder.
    * 0.5 is a good default.
    void setJPEGQuality(Player p, float val) {
         Control cs[] = p.getControls();
         QualityControl qc = null;
         VideoFormat jpegFmt = new VideoFormat(VideoFormat.JPEG);
         // Loop through the controls to find the Quality control for
         // the JPEG encoder.
         for (int i = 0; i < cs.length; i++) {
         if (cs[i] instanceof QualityControl &&
              cs[i] instanceof Owned) {
              Object owner = ((Owned)cs[i]).getOwner();
              // Check to see if the owner is a Codec.
              // Then check for the output format.
              if (owner instanceof Codec) {
              Format fmts[] = ((Codec)owner).getSupportedOutputFormats(null);
              for (int j = 0; j < fmts.length; j++) {
                   if (fmts[j].matches(jpegFmt)) {
                   qc = (QualityControl)cs[i];
                   qc.setQuality(val);
                   System.err.println("- Setting quality to " +
                             val + " on " + qc);
                   break;
              if (qc != null)
              break;
    * Convenience methods to handle processor's state changes.
    private Integer stateLock = new Integer(0);
    private boolean failed = false;
    Integer getStateLock() {
         return stateLock;
    void setFailed() {
         failed = true;
    private synchronized boolean waitForState(Processor p, int state) {
         p.addControllerListener(new StateListener());
         failed = false;
         // Call the required method on the processor
         if (state == Processor.Configured) {
         p.configure();
         } else if (state == Processor.Realized) {
         p.realize();
         // Wait until we get an event that confirms the
         // success of the method, or a failure event.
         // See StateListener inner class
         while (p.getState() < state && !failed) {
         synchronized (getStateLock()) {
              try {
              getStateLock().wait();
              } catch (InterruptedException ie) {
              return false;
         if (failed)
         return false;
         else
         return true;
    * Inner Classes
    class StateListener implements ControllerListener {
         public void controllerUpdate(ControllerEvent ce) {
         // If there was an error during configure or
         // realiz

    I do this all the time, I put my MBP to a 60 inch Sharp. If you have the video working do the simple thing first. Check to make sure your sound is on your TV and Mac. Then if that doesn't work go to System Prefrences and under sound go to a tab called Output and see if your TV is listed and if it is change it to that setting
    Hope It Works

  • XSLT mapping code for N:1 mapping

    Hi Guys,
    I have got one scenario to collect 5 files to merge as one. To this scenario I want to use N:1 mapping. If I am not wrong, with XSLT mapping is easiest way to do this, please correct me if I am wrong. Can any one provide some links or code to merge these files into one.
    Thanks in advance.
    San

    what is correlation here?
    I have three messages coming into BPM....now all the three messages should have a field (any field) whose value will be the same in all the messages.
    Ex:
    <Message1>
    <Name>SAP</Name>
    <ID>40</ID>
    </Message1>
    <Message2>
    <Name>SDN</Name>
    <ID>40</ID>
    </Message2>
    <Message3>
    <Name>FORUM</Name>
    <ID>40</ID>
    </Message3>
    Now to correlate the above messages, the field ID would be used as it has the same value in all the messages.
    How does message mapping looks for the following messages
    In your BPM you will have a Transformation step....the mapping included here will have three source messages (File1, File2, File3) and there will be a single target message which will have the below structure:
    <ROOT>
    <OUTPUT> ...... 0..unbounded
    </ROOT>
    OUTPUT node of the target should be duplicated (right-click --> duplicate ... in message mapping).....do it twice so that you will have three OUTPUT nodes.
    Now each target-OUTPUT node should be mapped to the source OUTPUT node, respectively.
    Regards,
    Abhishek.

  • Simultanious audio output from both mini Displayport and Audio Output port?

    Hey guys,
    I was wondering if someone who already has audio+video output through the mini displayport set up can be so kind and answer the following questions for me:
    Can audio be output simultaniously from 3.5mm audio port as well as the mini displayport? That is, if I output both video and audio to my reciever through the 2010 iMac's mini Diplayport, can i use the standard audio output port to provide line input for a further set of (active) speakers (analog would be fine)?
    In the case both outputs CANNOT work simultaniously, which one will work if i have both plugged in? If the mini displayport has higher rank (or priority or what whatever i should call the one that works when both outputs are plugged in), and the reciever it is plugged into is switched off, will audio automatically switch to the standard audio port? Same question goes if the standard audio output port has higher rank/priority?
    Many thanks in advance!
    Just in case you are wondering why the heck i would wanna do that, here's some background:
    I am planning on setting up my new 27' iMac on a 'work' desk in my bedroom, where i can comfortably sit and work on the computer as well as use the beautiful screen as my bedroom TV. Since i also wanna use my mac for all my living room multimedia needs (movies, tv shows, music, etc), i plan on running a long (15m) audio+video HDMI cable all the way up to my reciever in my living room. Furthermore, i am also planning on running a USB cable to the living room (through something of this sort: http://www.coolgear.com/images/171632pro.jpg) plugged in to a usb hub mainly for mouse/keyboard availability in the living room, but also for other things such as external hard drives and so on. The problem is that, apart from having my audio play in the living room, i also want to provide line input to my reference monitors that will be located at the iMac desk and i obviously much prefer i get the line input directly from the mac rather than running a third cable from reciever back to the speakers.
    Message was edited by: Leeon

    Anyone?
    Is that so few people are using the new mini displayport for audio, or did i ask the wrong way?
    Help will be greatly appriciated as i need this info in order to plan my purchases!

  • Airport Express for whole home audio

    Hello, newbie here. Question on using a single airport express instead of multiple for whole house audio.
    We are building a new home and still have the ability to easily run hardwire for speakers. Looking for inexpensive way to get itunes content to whole house audio.
    Will this work? imac/itunes > airport express(via airtunes) > multiple output amplifier(via rca minijack) > multiple ceiling speakers throughout home via hardwire.
    Wouldn't this work without having to buy multiple airport expresses to place throughout home? Don't care about listening to different music in different rooms-want the same music playing in all rooms.
    Thanks so much.

    smokeater1 wrote:
    Will this work?
    don't see why not.
    JGG

  • Acrobat 7 Professional Output Preview Preferences

    I think the new "Output Preview" tool in Acrobat 7 Professional is GREAT! Especially the ability to check "Total Ink Coverage".
    But, what I would like to see is the ability to set a preference for this tool. Seems it always defaults to 280. In our shop we are perfectly able to handle 320, so it would be nice to set it up to that instead.
    The tool seems a wee bit buggy when switching totals sometimes.
    And could Adobe also add this "Total Ink Feature" to inDesign CS as well.

    Agreed again. I work for a newsprint publisher, and it's a pain to have to reset 280 to 240 over and over again for each page or file opened. Either a way to remember last setting or reset the default would be much appreciated.

  • Is graphical mapping best for a large IDoc mapping to file?

    Hello,
    I have to map an IDoc to a file and 450+ lines are mandatory or needed to go a file output.  A lot of the lines need some value mapping.  Is XSLT or Java mapping better for this task? 
    John Xi

    Hi,
         If you require to do a lot of lookups and for large payloads, it would make sense to go for a Java mapping as in this case it would improve performance to some extent.
    For large messages, please refer the follwong link to improve system performance.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2016a0b1-1780-2b10-97bd-be3ac62214c7?quicklink=index&overridelayout=true
    Regards

  • Process Composer - Automated Activity - Output Mapping Error

    Hi,
    I am trying to consume the standard
    DocumentERPCreateRequestConfirmation_In_V1
    service in a process - CE 7.1 EHP1.
    Created one automated activity in the process to execute this service.
    When I try to do Output Mapping for the automated activity to Context, it throws an error:
    Incompatible expression type.
    Expected:Log,ns="http://example.org/test"
    Found:Log,ns="http://sap.com/xi/EA-APPL/SE/Global"
    "http://example.org/test" is the namespace of the context I'm using - a Web Dynpro Context.
    Any idea why is it so & what the error is?
    Thanks,
    Harish

    Hi Harish,
                   When I try to do Output Mapping for the automated activity to Context, it throws an error:
    Incompatible expression type.
    Expected:Log,ns="http://example.org/test"
    Found:Log,ns="http://sap.com/xi/EA-APPL/SE/Global"
    "http://example.org/test" is the namespace of the context I'm using - a Web Dynpro Context
    once u have mapped the node, u will get this error message. to remove the error message, map all the attributes from Node A to Node B.
    Hope your problem will be solved.
    Thanks and regards

  • How to Map Fomulas for Float Glass Process

    Hi All,
    Can anybody suggest how to map formulas for float glass process.
    As in float Glass process continuous production is going on single line, within that continuous ingredients are added in furnace and molten glass mass is coming out. this molten glass is now adjusted to particular thickness and then finally cut into specific sizes as per cusotmer requirment.
    Final product is in various thickness, width and length.
    Entire process is automated.
    If anybody already implemented same scenario, please share knowledge.

    Hi
    The following is the mapping process and it is tricky process need to map carefully.
    You can define this as a single formula.
    Output: Packed - cut to size - Finished Good Item.
    Input: All the Raw materials (Sand, Dolamite, Limestone, Soda Ash, Sodium Sulphate, Carbon, Iron Oxide)
    Packaging materials + Labels + Boxes etc.
    Define Routing:
    Resource: Furnace, Any other importance resource like Equipment that controls thickness, cutter etc, Labor, Associated Overhead
    Create recipe using the formula and routing.
    Various factors that can affect the mapping:
    1) Formula maintenance: You have to define formula for each output item.
    2) Possibility of dynamic determination of output item: If it is possible to produce different combination of thickness/width (and hence different FG item) in the same batch, then this won't be the right mapping.
    3) Process variations: Also formula mapping depends on how accurate is production process. If user wants to produce item X (say thickness 10mm) but due to quality issue produced item Y (say thickness 9mm) and such cases happens very often, this won't be right solution.
    4) Inventory measurement: This will determine the break-points. If you cannot measure the quantity (or even estimate) then you cannot define it as an intermediate item.
    I will explain how point 4 can lead to different way of formula mapping.
    Say you have a furnace that needs to run continuously for better quality or throughput. Hence you will be continuously adding raw materials to furnace and produce different outputs. You can break the single formula into multiple formulas as -
    Formula 1) Output: Molten mass of glass
    Input: All the Raw materials (Sand, Dolamite, Limestone, Soda Ash, Sodium Sulphate, Carbon, Iron Oxide)
    Formula 2) Output: Packed - cut to size - Finished Good Item.
    Input: Molten mass of glass
    To have formula in such fashion you should have a way to measure or estimate the weight of Molten mass of glass.
    If you are estimating the weight, there should be historical data available to determine what should be realistic output quantity for given input quantity. How much will be process loss and loss due to unwanted by product such as slag etc.
    Further you can break formula 2 as
    Output: One large sheet of give thickness
    Input: Molten mass of glass
    Output: Packed - cut to size - Finished Good Item.
    Input: The large sheet of give thickness.
    This kind of different mapping is possible which normally depends on:
    1) Complexity of process
    2) How complex BOM structure user wants to have
    3) Are there any benefits of maintaining such complex system - like accurate costing or accurate production monitoring or facilitating planning process.
    4) Can user maintain the complex system? Are they ready to capture data at finer level. Is it possible to capture the data.
    5) And most important thing is how to handle exceptions. If every thing goes smoothly as planned (less exceptions) then user can have and afford any level of complexity. But if there are many exceptions to the normal process you have to concentrate more on how to handle the exceptions.
    6) Satisfy all users: Accounting, Planning, Production, Quality, Inventory handling. Formula/Recipe touches all these modules.
    Regards
    Raj
    Sierra

  • Export all maps (mappings for all dimensions in EXCEL)

    Hi,
    it shouldn't be an unknown issue - but unfortunately I can't find the way :-(

    Below is updated code with the following changes :
    - Adjusted SaveAs logic to prevent Excel prompts in the event the file already exists, etc. (i.e. DisplayAlerts TRUE / FALSE)
    - Added Range creation logic for each worksheet page. If I really wanted perfect code, could do this better, but it gets the job done.
    Sub ExportAllCurrDimMapsForLocationtoXLS()
    'UpStream WebLink DM Custom Script:
    'Created By:         cbeyer
    'Date Created:       11-23-11
    'Purpose:               Export all dimension maps to an Excel workbook      
    'Declare Constant
    'NOTE : This will control whether the function gets the current map in the system or whether it looks back for a specific Period
    '       FDM stores the Map for each period that was loaded... You may want to export a particular POV Period for audit purposes, etc.
    '       IF you enable this, be sure to set the POV Period before running.....
    Const boolgetPOVPeriodMap = False
    'Declare working variables
    Dim intPartitionKey
    Dim strOutputMessage
    Dim strSQL
    Dim strCategoryFreq
    Dim objPeriodKey
    Dim strOutputFileName
    Dim strOutputFilePath
    'Get the location (PartitionKey
    intPartitionKey = RES.PlngLocKey
    'Create SQL Query to get Current Map Data
    If boolgetPOVPeriodMap = False Then
         strSQL = "SELECT * FROM tDataMap where PartitionKey = " & intPartitionKey & " order by DimName ASC"
    Else
         strCategoryFreq = API.POVMgr.fCategoryFreq(API.POVMgr.PPOVCategory)
         Set objPeriodKey = API.POVMgr.fPeriodKey(API.POVMgr.PPOVPeriod, 0, strCategoryFreq)
         strSQL = "SELECT * from vDataMap where PartitionKey = " & intPartitionKey & " and PeriodKey = '" & objPeriodKey.dteDateKey & " 12:00:00 AM' order by DimName Asc"
    End If
    'Create Recordset for all Exported Entities
    Set rsMap = DW.DataAccess.farsKeySet(strSQL)
    If rsMap.EOF And rsMap.BOF Then
         'No records
         If boolgetPOVPeriodMap = False Then
              strOutputMessage = "No Mapping data was found For " & API.POVMgr.PPOVLocation & ".  If this location Is using Parent Maps, you can only export mapping data at the parent location."     
         Else
              strOutputMessage = "No Mapping data was found For " & API.POVMgr.PPOVLocation & " for period " & API.POVMgr.PPOVPeriod & ".  If this location Is using Parent Maps, you can only export mapping data at the parent location."          
         End If
    Else
         'Records Exist, process
         'Generate file name / path
         If boolgetPOVPeriodMap = False Then
              strOutputFileName = API.POVMgr.PPOVLocation & "_DimensionMaps.xls"
         Else
              strOutputFileName = API.POVMgr.PPOVLocation & "_" & objPeriodKey.strDateKey & "_DimensionMaps.xls"
         End If
         strOutputFilePath = DW.Connection.PstrDirOutbox & "\ExcelFiles\"
         'Create Excel file reference     
         'Declare Excel working variables
         Dim oExcel
         Dim oBook
         Dim oSheet 'No puns here......
         Dim oRange
         Dim intCurrentSheetOrdinal
         Dim intCurrentRowOrdinal
         Dim intCurrentColOrdinal
         'Intialize Excel
         Set oExcel = CreateObject("Excel.Application")
         Set oBook = oExcel.Workbooks.Add
         'Declare working variables
         Dim strCurrDimName
         'Initialize variables
         strCurrDimName = ""
         intCurrentSheetOrdinal = 1
         intCurrentRowOrdinal = 1
         intCurrentColOrdinal = 1
         With rsMap
              Do Until .eof
                   'Check to see if current DimName matches existing DimName.  If not, add headers
                   If rsMap.fields("DimName") <> strCurrDimName Then
                         'If the dimension name has changed to a different dimension name, show total information before starting headers
                         'If the previous dimension was not "", then we are transitioning from one range to the next.  Lets create a named range on the just
                         'finished worksheet because we can or because you may want to use this for re-uploading
                         'NOTE : The range I'm creating is more for reference as to how to implement this and I don't know if I'm making the range in a fashion that
                         'FDM will pickup for importing. 
                         'NOTE : You probably want intCurrentRowOrdinal - 1 since it is 1 row past the last row of data at this point.  If you want to clean it up,
                         'then you need to make sure RowOrdinal is not going to be less than the starting point and I didn't feel like adding the couple rows of
                         'code to do the work properly as FDM will just ignore the blank row in all likelihood.
                                                                      If strCurrDimName <> "" Then
                                Set oRange = oSheet.Range("A6:K" & intCurrentRowOrdinal)
                                oBook.Names.Add "ups"&strCurrDimName, oRange
                         End If
                         'Create worksheet reference
                           Set oSheet = oBook.Worksheets(intCurrentSheetOrdinal)                    
                          'Create default header at top of each new dimension group
                             If boolgetPOVPeriodMap = False Then
                                  oSheet.range("A1") = (API.POVMgr.PPOVLocation & " - Map Conversion")
                             Else
                                  oSheet.range("A1") = (API.POVMgr.PPOVLocation & " - Map Conversion for " & rsMap.fields("PeriodKey"))
                             End If
                             oSheet.range("A3") = "Partition: " & API.POVMgr.PPOVLocation
                             oSheet.range("A4") = "User ID: " & DW.Connection.PstrUserID
                             'NOTE: I could make an array of the field names and do a loop here; however, this is easier to read.....
                             '      probably not how I would do it from an efficiency standpoint, but since it's a limited number of fields
                             '      this will work.....
                                 oSheet.range("A5") = "PartitionKey"
                                 oSheet.range("B5") = "DimName"
                                 oSheet.range("C5") = "Source FM Account"
                                 oSheet.range("D5") = "Description"
                                 oSheet.range("E5") = "Target FM Account"
                                 oSheet.range("F5") = "WhereClauseType"
                                 oSheet.range("G5") = "WhereClauseValue"
                                 oSheet.range("H5") = "-"
                                 oSheet.range("I5") = "Sequence"
                                 oSheet.range("J5") = "DataKey"
                                 oSheet.range("K5") = "VBScript"
                             'Update variables                   
                                strCurrDimName = rsMap.fields("DimName")
                                intCurrentRowOrdinal = 6
                                intCurrentSheetOrdinal = intCurrentSheetOrdinal + 1
                                'Update worksheet name
                                oSheet.name = strCurrDimName
                   End If
                     'Write Details
                            oSheet.range("A" & intCurrentRowOrdinal) = intPartitionKey
                     oSheet.range("B" & intCurrentRowOrdinal) = rsMap.fields("DimName").Value
                     oSheet.range("C" & intCurrentRowOrdinal) = rsMap.fields("SrcKey").Value
                     oSheet.range("D" & intCurrentRowOrdinal) = rsMap.fields("SrcDesc").Value
                     oSheet.range("E" & intCurrentRowOrdinal) = rsMap.fields("TargKey").Value
                     oSheet.range("F" & intCurrentRowOrdinal) = rsMap.fields("WhereClauseType").Value
                     oSheet.range("G" & intCurrentRowOrdinal) = rsMap.fields("WhereClauseValue").Value
                     oSheet.range("H" & intCurrentRowOrdinal) = rsMap.fields("ChangeSign").Value
                     oSheet.range("I" & intCurrentRowOrdinal) = rsMap.fields("Sequence").Value
                     oSheet.range("J" & intCurrentRowOrdinal) = rsMap.fields("DataKey").Value
                     oSheet.range("K" & intCurrentRowOrdinal) = rsMap.fields("VBScript").Value
                   'Increment Counters
                   intCurrentRowOrdinal = intCurrentRowOrdinal + 1
                   'Move to the next record
                   .movenext
              Loop
         End With
         'Final Sheet Named Range addition
         'Since the loop will end and we will not execute the above logic to create the range for the previous sheet
         'the easiest (laziest) solution is to just handle the last sheet after the loop.
         'We're basically doing the same stuff we did above, just down here.
          If strCurrDimName <> "" Then
              Set oRange = oSheet.Range("A6:K" & intCurrentRowOrdinal)
               oBook.Names.Add "ups"&strCurrDimName, oRange
          End If      
         'Close / release file objects
         'Added some logic here to ensure you don't get caught up on the file replace prompt.
         oExcel.Application.DisplayAlerts = False
         oBook.SaveAs strOutputFilePath & strOutputFileName
         oExcel.Application.DisplayAlerts = True
         oExcel.Quit
         'Create output message          
         strOutputMessage = "Mapping data export for " & API.POVMgr.PPOVLocation  & " complete.  Extract file is : " & strOutputFilePath & strOutputFileName
    End If
    'Close / release data objects
    rsMap.close
    'Display output
    If LCase(API.DataWindow.Connection.PstrClientType) = "workbench" Then
              MsgBox strOutputMessage       
    Else
         'Let the user know we are done
         RES.PlngActionType = 2
         RES.PstrActionValue = strOutputMessage
    End If
    End SubEdited by: beyerch2 on Dec 14, 2011 9:43 AM

Maybe you are looking for