Can Max global channels be programmatically added to a created task?

I can add Physical channels to a created task, but cannot seem to add global channels to a task that was previously created.  The problem here is that I want to create my task with the channels (both physical and global) in a specified order.
Thanks,
Mike Sachs

Hi Mike-
You can add global virtual channels to a programmatically-created task by using the DAQmx Create Task VI.  This allows you to create a task with existing global virtual channels and then add virtual channels at run-time in the usual manner.  Here's an example that shows a global channel (created for Dev5/ai0) and a virtual channel within the same task:
Hopefully this helps-
Message Edited by Tom W [DE] on 02-09-2006 11:06 AM
Tom W
National Instruments
Attachments:
global_virtual_task.JPG ‏52 KB

Similar Messages

  • How can I set the parameters of global channels and tasks previously created inside my applicatio​n?

    Hi everyone !
    Before proceeding to the description below I think it´s important to say that I´m using NI USB-6008 as DAQ device and the driver used is DAQmx 7.5.
    I´m currently developing an application into which I intend to be able to have complete control of the DAQ device being used, i.e, I´ll be able to create, delete and change the configuration of global channels and tasks previously created, among other things.
    To achieve the ends specified above I´ve already developed two vis, one to create global channels and the other to create tasks, and these two are doing a fine job. After this, I thought I came to the easy part ... I think I couldn´t be far for the truth! I thought that everything I should do was to specify which channel or task I´d like to configure and then use a property node to get the results I wanted, but it´s not working ...there are some DAQmx property nodes I thought I could use to do it  but I didn´t find a way to change the configuration of the global channels, and none of these property nodes seemed to work, i.e, although the simple vis used to test them ran the chosen parameters didn´t alter at all, after each execution I used MAX to see if they had changed, and to my chagrin they hadn´t.
    Can anybody lend me a hand with this problem? As always, any help would be deeply appreciated !    

    Hi Giovani,
    There is a developer zone tutorial that discussus some advanced data acquisition features including programmatic saves of NI-DAQmx tasks, global channels, and scales.  This tutorial also includes an example program.
    I wrote a short program that creates tasks in MAX. Whenever I wanted to change a part of the task, I would just change that feature in the example program. Take a look at the examples and please let me know if you have any further questions.
    Regards,
    Hal L.
    Attachments:
    create task example.vi ‏33 KB

  • Create global channels programmatically

    hello all,
    my question is related with daqmx.
    i want to know if theres any way to create global channels or tasks programmatically without using max or daqmx assistant
    the usual procedure is to create global  tasks or channels using max or daqmx assistant and then add them to ur tasks programmatically.
    i want to avoid the use of max here and create channels programmatically that can be used or called later.
    Solved!
    Go to Solution.

    You can use the DAQmx Save Task or DAQmx Save Global Channel VIs to save them programmatically.
    http://zone.ni.com/reference/en-XX/help/370469AA-01/lvdaqmx/mxsavetask/
    I agree with Dennis though, almost all DAQ tasks can be accomplished using the standard functions.  You might want to take a look at some DAQ examples by going to Help > Find Examples > Hardware Input and Output > DAQmx.  I always start with these examples and modify them as needed.
    Matt J
    Professional Googler and Kudo Addict
    National Instruments

  • Change global channel programmatically????

    hi..
    is it possible to change a physical channel in global channel programmatically?????????
    i am using labview 8.2......

    Duplicate post (by browser's mistake ?!) .
    - Partha
    LabVIEW - Wires that catch bugs!

  • If I uncheck "Available For Tagging" from a global termset can I still access it programmatically?

    If I uncheck "Available For Tagging" from a global termset can I still access it programmatically? The answer would appear to be "No". I have a console app that uses 
    TaxonomySession session = new TaxonomySession(site, true);
    var termStore = session.TermStores[0];
    termStore.UpdateCache();
    var group = GetTaxonomyGroupByName(termStore.Groups, "Global Termsets");
    TermSet globalTermSet = group.TermSets.FirstOrDefault<TermSet>(e => e.Name.Equals("My termset", StringComparison.CurrentCultureIgnoreCase));
    OR
    TermSet gts = group.TermSets["My termset"];
    If I uncheck "Available for Tagging" this this fails. When I re-select "Available for Tagging", it works.
    Obviously, this is the way SP is designed (I think) but my question is
    why? I don't want my navigation termset being used for tagging. I have a different termset for that. This suggests that tagging also controls api visibility to the termset. Is this something that other experienced developers can comment on?
    Thanks!

    The only way to get to the unavailable terms is through the session.GetTermsInDefaultLanguage, GetTermsInWorkingLocale and GetTermsWithCustomProperty. All three of these methods offer arguments to exclude or include unavailable terms. You can also call these
    methods on the TermSet its self.
    https://msdn.microsoft.com/en-us/library/ee568627(v=office.14).aspx
    Blog | SharePoint Field Notes Dev Tools |
    SPFastDeploy | SPRemoteAPIExplorer

  • Virtual Global channels created but not selectable

    I have recently updated all of my drivers to the latest version for Labview 7.1 in Windows XP.  As a result of this upgrade, I no longer have access to my virtual global channels, which all transferred and still exist.  Old vi's created with global channels continue to execute, and existing tasks, which reference virtual channels continue to work; however, I believe that this is a result of the NI drivers converting and storing these configurations as logical channels.  Anyway, when creating a new task from within MAX, or using the DAQmx express vi's from within Labview, I no longer have the tab that allows me to select which virtual channels to add to that task, eventhough all of the virtual channels are still defined correctly and available from within MAX.
    Any help would be appreciated.

    Hi Kike,
    After your harddisk crashed, did you reinstall everything?  Make sure that you installed LabVIEW first, then the DAQmx drivers and finally the hardware.  If you did not install in that order, then it's possible that issues might arise. 
    Are you saying that you have 10 Global Virtual Channels and 7 Tasks, but now you don't see them, or is the issue still when you try to create a new task you don't see the Global Virtual Channels avaliable? 
    As for the example finder, are you getting an error message like NI Service Locater is not Running or are you not able to find the NI Help Server?  You can click on the two links for some trouble shooting steps if that is the case.
    If my assumptions are not correct, please provide more information so that I can understand your situation.
    Message Edited by Nick F on 07-30-2007 07:11 PM
    Thank You,
    Nick F.
    Applications Engineer

  • Modification of Global channels In NIMax while Labview Program running, not updating in Labview

    Hello,
         Okay, here is my issue.  I have a program that reads data from a device using global channels in MAX.
    Step 1:  I open MAX with the systemExecute.vi with the parameters to wait till program finishes.
    Step 2:  I Modify a channel in Max, for example change the assigned daqMX Scale, or Min Max values.
    Step 3:  Save channel in Max.
    Step 4: Exit MAX with the file exit.
    Step 5: The Labview program continues, and I re-read the available global channels and global scales in the Labview vi but the properties have not changed to match what I change in MAX.
    If I stop the VI then start it again and read the global channels then the properties get updated.  How can I get the channel properties to update in Labview after changes are made in Max without stopping the labview vi and starting it again?

    Many properties of the channel can only be modified when the task is not running.  Have you tried stopping the task in LV before modifying the parameters, and then re-starting the task?
    Dan

  • Porperty "Descritpion" of a global channel

    Hello all,
    I have have to update a piece of software (written in LabVIEW 6.1) which read the description of a DAQ-Channels and dsiplays this information.
    It uses the traditional DAQ functions (the channel descriptions can be set through the M&A Explorer).
    After switching to LabVIEW 7.1 for the software and DAQmx for the hardware, I found, that the description of a channel could not be set through M&A.
    With the property "Description" of a global channel used in LabVIEW, I can assign a description to a global channel. But this description is only available as long as the software is alive.
    Two questions:
    1. Where can I assign a description to a global channel
    permanently (like to traditional DAQ channels)?
    2. Is this the right place for my question?
    Regards
    Heinrich

    Hi - you can programatically update and write to a global channel in DAQmx 7.4 and higher, however you cannot do this through MAX directly, so you have to make your own utility to do this.
    Have a look at http://www.ni.com/info
    and type in daqmxpro in the box.
    Hopefully that will give you enough information for the future.
    Thanks
    Sacha Emery
    National Instruments (UK)
    // it takes almost no time to rate an answer

  • Verizon To Add More .Tv Channels. Sony Movie Channel To Be Added.

    Verizon is set to add more .tv channels where two of them are on their way. Legacy .tv a .tv channel from byron allen's entertainment studios will be added to the fios guide and another channel called "justice central .tv" is on its way where it is expected to be made available for fios customers soon. Justice central .tv is a channel that is all about court tv shows where what viewers will have an opportunity to watch are programs like "we the people with gloria allred" where she dishes out her own brand of justice to people who appear in her courtroom. It is a channel that will be all about judges yelling at plantiffs and defendants that will also have a lot of infomercials. That will make it 8 .tv channels where byron allen is also looking to create more .tv channels for verizon to add to their lineup since he has a contract with verizon to add any channel that he has to the fios guide. For the record verizon has entertainment studios .tv, pets .tv, recipe .tv, comedy .tv, my destination .tv, and cars .tv which won an emmy for "outstanding lifestyle program." Another channel that is on the way is the sony movie channel in hd where sony has already confirmed that the channel will be added in the next 2-3 months to the fios guide. Now i have never seen anyone make any requests for .tv channels and i have never seen anyone say that they wanted more of them to be added but that is going to change soon where not only will there be 8 but maybe by the end of the year there may be a total of 10,11,12 or maybe even 13. It all depends on how fast byron allen can create these channels because clearly verizon is willing to add as many of them as they can. There is a really long list of channels that fios customers have been asking for to be added to the guide where the competition has added them so it is not an outrageous request to ask verizon to at least match what the competition has to offer.   

    Which means FiOS is better than the other services, Bob!

  • How can I read channels from different SCXI modules simultaneu​sly?

    Hello.
    I have a system that consists in:
    - Three E-series DAQ boards (PCI-6034, PCI-6052 & PCI-MIO-16E)
    - One SCXI chassis (SCXI 1001)
    - 4 SCXI modules for voltage measurement connected to PCI MIO 16E
    - One SCXI module for strain gauges connected to PCI 6034
    - One SCXI module for accelerometers connected to PCI 6052
    I have to develop a software application that reads all the channels at the same time or at least in the same program cycle. I have tried to create only one DAQmx task containing all the channels, although they belong to different DAQ boards (and SCXI modules, of course), but it seems to be impossible to use channels from different devices in the same task.
    So I have created three different DAQmx tasks, one for each device and its channels. I have used one "DAQmx Start Task" VI for each task at the beggining of the loop in order to use them independently, reading their channels inside the loop in every program cycle.
    When I have run the program I have get the following error:
    "ERROR -200619 ocurred at DAQmx Start Task.vi
    Chassis cannot be used for more than one scanning operation at the same time.
    Do only one scanning operation or combine multiple scanning operations into a single operation."
    What is the problem? How can I combine these multiple scanning operations? What can I do to read all channels at the same time?
    Thanks.

    Hello pablomendana,
    it's ok that you got an error when trying to use more than one device on the same task. According to the setup you have, I agree that 3 tasks should be put in place.
    The key question I have is... Have you configured manually at MAX the SG and accel. modules to be in Parallel mode?
    I would not expect the error you get if they are in parallel mode (in which you could even read directly from the DAQ board, using DAQ device channels instead of SCXI channels).
    Unfortunately, I haven't been able to setup a system similar to yours, but I would like to know more details on what you've tried so far.
    Also, I recommend you that if still need help on setting up the system, use NI's SSP program to get support from your local NI Application Engineering organization, as this will be faster than the forum.
    Regards,
    Jorge M.

  • Programmatically adding chart to a report throws exception

    programmatically adding chart to a report throws exception "chart condition fields are not valid".
    Configuration:
    I am using CR4E to create web application, I've added RAS jars (rasapp.jar, rascore.jar, reporttemplate.jar, serialization.jar) to this web application. For designing reports i am using Crystal Reports 2008.
    Code:
    <%
    // Get the previously opened report from the session.
    ReportClientDocument reportClientDocument =
         (ReportClientDocument)session.getAttribute("ReportClientDocument");
    System.out.println(reportClientDocument.getReportDocument().getName());
    // Try to get the report's DataDefinition object.
    IDataDefinition dataDefinition;
    try
         dataDefinition = reportClientDocument.getDataDefController().getDataDefinition();
    // If the DataDefinition object can not be retrieved, redirect the user to an error page.
    catch (Exception e)
         System.out.println("With error1");
        return;
    // Create a new ChartDefinition object and set its type to ChartType.group.
    ChartDefinition chartDefinition = new ChartDefinition();
    chartDefinition.setChartType(ChartType.group);
    Get the conditional field of the report's first group. Set this conditional
    field for the ChartDefinition object using the setConditonalFields method. Notice
    that the conditional field is first placed in a Fields collection because the
    setConditionalFields method takes a Fields object as an argument.
    Fields conditionFields = new Fields();
    if (!dataDefinition.getGroups().isEmpty())
         IField field = dataDefinition.getGroups().getGroup(0).getConditionField();
         System.out.println("Condition field name ->" + field.getLongName(Locale.ENGLISH));
         conditionFields.addElement(field);
    chartDefinition.setConditionFields(conditionFields);
    //Get the summary field name from the form on the previous page.
    String summaryFieldName = URLDecoder.decode(request.getParameter("summaryField"));
    System.out.println("Summary field name ->" + summaryFieldName);
    Loop through all of the report's summary fields until the one matching the name
    above is found. Set this summary field for the ChartDefinition object using the
    setDataFields method. Notice that the summary field is first placed in a Fields
    collection because the setDataFields method takes a Fields object as an argument.
    Fields dataFields = new Fields();
    for (int i = 0; i < dataDefinition.getSummaryFields().size(); i++)
        IField summaryField = dataDefinition.getSummaryFields().getField(i);
         if (summaryField.getLongName(Locale.ENGLISH).equals(summaryFieldName))
              System.out.println("Adding data field ->" + summaryFieldName);
              dataFields.addElement(summaryField);
    chartDefinition.setDataFields(dataFields);
    Create a new ChartObject to represent the chart that will be added.  Set the
    ChartDefinition property of the ChartObject using the ChartDefinition object created
    above.
    ChartObject chartObject = new ChartObject();
    chartObject.setChartDefinition(chartDefinition);
    Get the chart type, chart placement, and chart title strings from the form on the
    previous page. If no chart title was chosen, create a generic title.
    String chartTypeString = request.getParameter("type");
    String chartPlacementString = request.getParameter("placement");
    String chartTitle = request.getParameter("title");
    System.out.println("chartTypeString ->"+ chartTypeString + "<-chartPlacementString->" + chartPlacementString + "<-chartTitle->"+chartTitle);
    if (chartTitle.equals(""))
         chartTitle = "untitled";
    Create a ChartStyleType object and a AreaSectionKind object based on the
    the chartTypeString and chartPlacementString retrieved above. In this example
    possible chart types are bar chart and pie chart. Possible chart placements
    are header and footer.
    ChartStyleType chartStyleType = ChartStyleType.from_string(chartTypeString);
    AreaSectionKind chartPlacement = AreaSectionKind.from_string(chartPlacementString);
    // Set the chart type, chart placement, and chart title for the chart.
    chartObject.getChartStyle().setType(chartStyleType);
    chartObject.setChartReportArea(chartPlacement);
    chartObject.getChartStyle().getTextOptions().setTitle(chartTitle);
    // Set the width, height, and top for the chart.
    chartObject.setHeight(5000);
    chartObject.setWidth(5000);
    chartObject.setTop(1000);
    Get a ReportDefController object that can be used to modify the report's definition.
    ReportDefController reportDefController;
    try
         reportDefController = reportClientDocument.getReportDefController();
    catch (Exception e)
         System.out.println("With Error2");
         return;
    *Create a Section object that represents the section that will hold the chart.
    If the chart placement was set header, get the header section, otherwise, if the
    chart placement was set to footer, get the footer section.
    Section chartSection = null;
    if (chartPlacement.equals(AreaSectionKind.reportHeader))
         IArea reportHeaderArea =
              reportDefController.getReportDefinition().getReportHeaderArea();
         chartSection = (Section)reportHeaderArea.getSections().getSection(0);
    else if (chartPlacement.equals(AreaSectionKind.reportFooter))
         IArea reportFooterArea =
              reportDefController.getReportDefinition().getReportFooterArea();
         chartSection = (Section)reportFooterArea.getSections().getSection(0);
    Add the chart to the section using the ReportDefController object.
    reportDefController.getReportObjectController().add(chartObject, chartSection, 1);
    // Save the changes and close the report.
    reportClientDocument.save();
    reportClientDocument.close();
    session.removeAttribute("ReportClientDocument");
    %>     
    Trace:
    com.crystaldecisions.sdk.occa.report.lib.ReportDefControllerException: The chart condition fields are not valid.---- Error code:-2147213287 Error code name:invalidChartObject
         at com.crystaldecisions.sdk.occa.report.lib.ReportDefControllerException.throwReportDefControllerException(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportObjectController.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportObjectController.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportObjectController.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportObjectController.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportObjectController.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportObjectController.add(Unknown Source)
         at org.apache.jsp.AddChart_jsp._jspService(AddChart_jsp.java:230)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:283)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:218)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
         at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
         at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:393)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         at java.lang.Thread.run(Thread.java:595)

    Please try this code snippet
    var cs:ColumnSeries = new ColumnSeries();
    cs.dataProvider = dp;
    cs.displayName = "Series 2";
    cs.yField = "values";
    chart.series.push(cs);
    OR
    var temp:Array = [];
    var cs:ColumnSeries = new ColumnSeries();
    cs.dataProvider = dp;
    cs.displayName = "Series 2";
    cs.yField = "values";
    temp = chart.series;
    temp.add(cs);
    chart.series = temp;

  • Can PCM multi-channel wav (not DD or DTS) be sent over SPDIF

    <Can PCM multi-channel wav (not DD or DTS) be sent over SPDIF? --- X-Fi Elite Pro SB055A and Audio Creation Mode ---
    If I understand correctly, SPDIF format can support uncompressed MULTICHANNEL wav format (within the limitations of its bandwidth) as well as the more usual DD or DTS encoded format on SPDIF.
    One of the neat things about Creative's Audio Creation Mode in the Recorder section is the ability to actually record to a multi-wav format (but the sample size seems to be fixed at 24 bit). This means it is quite simple to have several mixer inputs and record a mixed multi-channel wav file in one go. Great and this works as expected with a 5. ?24 bit/48 kHz recorded test file.
    My question is when one plays this recorded multi-channel wav file back, the mixer monitor (playback) shows the various 5. (say) channels with their separate content. Can this multi-channel *uncompressed* wav data? be sent over the SPDIF output as is to preserve the PCM quality? (so no DD or DTS encoding used)? I have tried this and I?ONLY seem to be able to get a STEREO (2 channel mixed down) version received at another SPDIF-in sound card (my Audigy 2ZS PCMCIA). I tried almost all selections at both ends involving SPDIF.

    @? In answer to my own question, and I think I had known this a while back, SPDIF standard only supports transmission of either 2 channel PCM (uncompressed) stereo with up to 24 bit resolution per channel and up to as much as 92 kHz sampling frequency, or compressed (DD or DTS) multichannel audio up to 5..
    Since each frame of SPDF is 64 bits in length (with a single sample of L and R channels plus extra bits of status in each frame), at 92 kHz max sampling rate, this translates to about 3 Mbits/sec bit rate. However most SPDF don't support the 92 kHz rate (which for 24 bit would be the stereo rate for DVD-Audio) for various copyright protection reasons.
    Here is short demonstration of SPDIF transmission of 24bit/96 kHz between two sound cards with and without "bit accurate for playback" enabled:
    ? http://www.jensign.com/spdif/

  • Programmatically Added Web Part Issues - Powershell

    Hello!
    I have been doing quite a bit of research on this for the last few days but so far to no avail. What I am trying to do is use a powershell script to create a Content Editor Web Part on a basic sharepoint site created using the Team Site template. 
    The issue I'm running into is when I use the script I have to add a new web part to the "wpz" zone. The webpart gets created properly and exists in the webparts collection however it does not show up on the page. I can bind to the webpart through
    powershell and can see that the visible property is set to true while the hidden property is false. The webpart is not closed it simply doesn't show up. 
    When I add the webpart to another zone it shows up properly however as soon as you edit the page the webpart disappears. However this only happens while the page is in edit mode. As soon as you save the page the programmatically added webpart immediately
    shows back up in the zone it's supposed to be in. 
    I was wondering if anyone else had ever experienced this specific issue and if there is anything I can do to fix it.
    The environment is a development box running Microsoft Server 2012 and is hosting Sharepoint 2013. 
    Thanks!

    Hello Patrick,
    Thanks for your response. The script I am using is in the following code block:
    $SiteUrl = "http://maddevsp01.btdev.net/my/personal/14736"
    $WebUrl = "http://maddevsp01.btdev.net/my/personal/14736"
    function main() {
    [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
    $OpenWeb = Get-SPWeb $WebUrl
    $OpenSite = Get-SPSite $SiteUrl
    $file = $OpenWeb.GetFile("$WebURL/SitePages/Home.aspx")
    $WebPartManager = $file.GetLimitedWebPartManager([System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared)
    Add-ContentEditorWebPart "$WebURL" "$WebURL/SitePages/Home.aspx" "wpz" 12 "Test" "Test webpart"
    $OpenWeb.Dispose()
    function Add-ContentEditorWebPart($SiteURL, $pageUrl, $webpartzone, $index, $title, $content)
    $site = new-object Microsoft.SharePoint.SPSite($SiteURL)
    $web=$site.OpenWeb()
    $webpartmanager = $web.GetLimitedWebPartManager($pageUrl, [System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared)
    $webpart = new-object Microsoft.SharePoint.WebPartPages.ContentEditorWebPart
    $webpart.ChromeType = [System.Web.UI.WebControls.WebParts.PartChromeType]::Default;
    $webpart.Title = $title
    $docXml = New-Object System.Xml.XmlDocument
    $contentXml = $docXml.CreateElement("Content");
    $contentXml.set_InnerText($content);
    $docXml.AppendChild($contentXml);
    $webpart.Content = $contentXml;
    $webpartmanager.AddWebPart($webpart, $webpartzone, $index);
    $web.Close()
    $site.Close()
    function Get-SPSite([string]$url) {
    New-Object Microsoft.SharePoint.SPSite($url)
    function Get-SPWeb([string]$url) {
    $SPSite = Get-SPSite $url
    return $SPSite.OpenWeb()
    $SPSite.Dispose()
    main
    I was investigating further after posting yesterday and used powershell to bind to a webpart created by the script and a webpart I created using the sharepoint interface. Then I exported all the properties and their values to two different text files and
    used winmerge to compare the differences to see if there was a setting I was missing in the script or something akin to that. However when I did the comparison the only differences between the two were the following values: Title, Description, PartOrder, ID,
    StorageKey, EffectiveTitle, DisplayTitle, ZoneIndex, ClientID, and UniqueID. All of which you would expect to be different. All other settings are exactly the same on both webparts.
    I am at a complete loss as to what this issue might be.
    Kindest Regards,
    -Zach

  • Mutiple global channels

    In LV 7.1 how do I create a DAQmax task from multiple global max channels. The global channels are all analog but different types in a PXI\SCXI chassis

    Hi Larry,
    Please refer to the following link that discusses your issue:
    http://digital.ni.com/public.nsf/websearch/3296BA2AEF586B7386256D6D00528E3D?OpenDocument
    Regards,
    Ankita A.
    National Instruments

  • I can not delete my history and adding new bookmarks. Upgrading to later Firefox versions and/or re-installing didn't help. The address bar still shows the web addresses of old and whenever I make new bookmarks, it's always gone as if it was never made.

    I can not delete my history and adding new bookmarks.
    Upgrading to later Firefox versions and/or re-installing didn't rectify it either.
    The address bar still shows the web addresses of old and whenever I make new bookmarks, it's always gone as if it was never made.
    Also, I have noticed that every once in awhile you can not close tabs you've opened, either by pushing on the X button and/or clicking on the mouse to close it. Although closing the window and opening it again (without closing the Firefox application) seemed to rectify the problem in the short term, it's becoming quite annoying.
    == This happened ==
    Every time Firefox opened
    == the Firefox is being used

    I think I have a solution.
    First, download the add-on SQManager. This should be included with FireFox, it is really good.
    Look for the file '''moz_hosts''' in the folder '''places.sqlite'''.
    Don't delete the file, just delete the information in the file. My file has over 3600 websites, which go back years!! I did not know they were there, but I was frustrated about not being able to get rid of them. They popped up every time I used the address bar. Clearing my history would not get rid of them.
    This is where they are stored!! I found that by deleting the pesky web site from '''moz_hosts''', it does not appear in my address bar anymore!!!
    I think that if I just delete all the websites in moz_hosts....
    Wa-la...History Gone!!!
    As long as you don't delete the file, just empty it, FireFox won't know the difference. It will just keep adding websites to it until you empty it again.
    Why running "clear recent history" doesn't do this, I don't know. You are doing manually what "clear recent history" is not doing.
    Please tell me if you see any flaw in this.
    ''I think it's the solution we've all been looking for!''

Maybe you are looking for

  • AFS Inventory Management in BI

    HI All Can anyone provide me material step by step process for AFS Inventory Management in BI? Praveen

  • Placing an Illustrator file into a Word document

    What format should Illustrator art be saved in/exported as so that it shows up when placed in a Word document? The options I tried showed up as a black box once it was placed in Word.

  • EURO Support Oracle9i Enterprise Edition Release 9.2.0.4.0 ?

    Hi, Does Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production support EURO?If yes, what should be the data type I need to use to store the same? I have tried to store the Euro character in varchar2 data type column in the above database.When i

  • Did your 7.1.2 upgrade finish well?

    Had a touch of an issue upgrading the iGadgets last night, in that the process refused to complete normally and had to be force-restarted. Rather than redoing the whole story, here's the details of my post in the iPad forum: iOS 7.1.2 upgrade odditie

  • Assign Multiple Sales Org for One Plant in STO process

    Hi Experts, Aware that I can assign multiple sales org to 1 plant (relationship: many to many). I am trying to create STOs to supplying plant and assigning them to different sales organization but encountered problem. Example: Supplying Plant 1000 -