Jump to content

jgcode

LabVIEW Tools Network
  • Posts

    2,397
  • Joined

  • Last visited

  • Days Won

    66

Posts posted by jgcode

  1. Hello,

    I'm trying to build a project programmatically. The "Add Files to Project" example VI is a really good start but I'm trying to take it further. However, I'm struggling! I'd like to add a build specification under "Build Specifications", akin to right-clicking on "Build Specifications" and selecting "New">"Application (EXE)", and configuring it appropriately. The "ProjectItem:AddItem" method seems the way forward, with perhaps "Application (EXE)" (guessing) as the "Type" input, but "Name" and "Path" inputs baffle me somewhat. Has anyone any pointers for me? All I want to do is copy the build spec. from one project to another. Searches have revealed little.

    Regards, GGT.

    Hi Graeme

    I have posted example code here that you may want to look at to add files to a project etc...

    For your copying build spec question Cat tried to tackle it here. I had a really quick go to and kept corrupting the xml. I would be interested to know if you get it to go.

    Cheers

    -JG

  2. ok, got it sorted... not sure what I was doing wrong! I dont think it installed correctly, but after manually coping the hook VI it worked ok.

    Everything works as expected. Don't know why I expected the Class terminal to be bolded, only the actual inputs.

    I made a small mod to your VI, I removed the automatic setting of camelCase in the hook VI, now it uses the Localised Strings as I want it to.

    Thanks for posting your code!

    Neil

    Your welcome.

    You should NOT have to do any manual coping!!

    The package installed the required files.

    I tested it at home last night and work this morning and it seems ok

    Would you mind uninstalling/installing to confirm?

    Additionally are you able to post how you used the CLSUIP_LocalizedStrings.vi in your code?

    I wasn't able to use it as the global variable is accessesed scope as private?

    Cheers

    -JG

  3. You would, because they're not related. I put type cast in bold in my original post to indicate that you should use the type cast primitive, which doesn't do the type checking (similar to the flatten-unflatten trick Felix used), but just reinterpets the data on the wire. As I also said, it was a long shot which didn't pay off.

    Ah - ok.

    I have never down this before, so are you saying even if you get a type mismatch with the More Specific Class functions you could get access to other hidden private properties using type casting?

    If so that is cool.

  4. Got some time, so here the results.

    New VI object: style = string Control 1; vi obj class = String Constant (Decoration.Text does not work).

    To type cast the object, instead of to more specific class, I use Flatten To/Unflatten From String (works without errors). Now I have the reference as String Control. If I try to set the Key Focus I get Error 1058 'Specified property not found'.

    Felix

    Haha! I was playing around with yours too but couldn't get anything to go yet :)

    Thanks for working on this

  5. Propably you can workaround by creating a mouse click on the appropiat location. But this would be heavy coding if you need to interface that via Win API (and not nice plattform independent code).

    Do we have some way to directly pass Mouse Events to LV?

    Felix

    Sounds hardcore for what I want to do :frusty:

    I was actually refering to the string control class (although, as I suspected, the KeyFocus property is not supported). You can highlight the comment using the relevant method, but that won't edit it.

    Hi Yair

    That is what I meant when I said Control Class - but I get a type mismatch error when I tried to convert the Text Class to a String Class (which makes sense).

    The problem is that I cannot get Text.Start-End Selection property to work either.

    With Controls I need to put them in Focus first then use the Start-End Selection property otherwise that property doesn't work.

    Am I doing this wrong for a BD label?

    Cheers

    -JG

  6. Can you please explain to me why there are two CLSUIP_LocalizedStrings.vi? (one in LVClassLibrary and one in LVClassLibrary\NewAccessors). What is the difference between these two?

    Hi Neil

    Thanks for the feedback.

    I meant to take this VI out of the package as I did not want to distribute NI VIs when I want to submit it for certification.

    Therefore use the one under NewAccessors not mine (mine is getting installed in the wrong spot anyway!).

    I use the default VI form NI as the hooks automatically change the name to the get/set.

    Its a bug that it is still in there.

    I will do a fix tonight at home and load a new version with readme.

    Cheers

    JG

  7. I must be a friggin idiot. For the life of me I cannot get the clipboard to grab a copy of the template. I've tried following exactly what you do in the video but it always pastes an empty canvas. frusty.gif Did you secretly put a copy of the banner on your clipboard before you started recording? shifty.gif

    Haha nope! No cheating here.

    Don't know if that makes a difference - I am running 9.0f2 with the update for IE.

    And if it helps, here are the exact steps I do:

    1. Start on Layers Tab with a Icon Template selected
    2. Double click the Select Tool to put a marquee around the icon preview
    3. Hit Ctrl + C for the copy shortcut
    4. Click in the User Layers control
    5. Hit Ctrl + V to paste
    6. The new layer will have the tag Clipboard

    It works if User Layers exist of there are no User Layers, with Icon Text or without.

    Let me know how you go.

    Cheers

    -JG

  8. I'm guessing this won't work, but you could try to type cast the reference to the text control class. If the BD text class has the relevant properties and they're just hidden, this may work, but it's more likely not to work at all (and it even has the potential to cause damage).

    Thanks Yair, the Text Reference is the same for the BD and FP, it was the control property I was after, so I don't know if it is possible :(

  9. Hi JG

    Yes it's true, the limitation of this solution is than there isn't any memory preallocating and for this reason it's better to use it with small size array.

    Yes i know OpenG Conditional Auto Indexing Tunnel , but with it you must before have one booleen array (elements to keep)to filter the array in).

    Perhapse it will be interesting that you show us, how you made the same exempl ( even array) with OpenG Conditional Auto Indexing Tunnel . wink.gif

    Certainly my good man.

    Attached is an example project that includes benchmarking for building an array:

    1. From the front
    2. From the back
    3. Preallocating memory first, then taking subset
    4. Using the OpenG array

    I get difference performance on single core vs dual core.

    Unfortunately this example includes keeping odd numbers I hope that is ok! :P

    14 Build Array.zip

    [LabVIEW 2009]

  10. Hi

    I just want proposing you a trick for conditional array filling with feetback node . Perhapse lot's of you know that , perhapse not.

    Eric BOBILLIER

    post-5178-126109025167_thumb.png

    Exempl in LV2009

    Hi Bob

    Cool trick!

    (Although in this case you have used a while loop)

    I personally prefer OpenG Conditional Auto Indexing Tunnel over preallocating arrays.

    All the performance, non of the hassle :P

    Have you seen this VI?

    post-10325-126109128268_thumb.png

  11. Done http://decibel.ni.com/content/thread/5192

    But I was just querying the brains here at LAVA first!

    As far as I know, the image data does not have layer information but instead the "merged" (flatten) layer data.

    It is my understanding the the layer data is stored as tag in the VI file and they are not accessible through the get as image data method.

    PJM

    Thanks PJM

    From all your playing with IE do you know how layers get loaded into the IE?

  12. The class cube seems to be stored as a tag in the .lvclass:

    <Property Name="EndevoGOOP_ClassItemIcon" Type="Str">GrayFull</Property>

    Where the GrayFull has a corresponding png file in the Framework\Providers\Endevo directory

    You can manually edit the .lvclass file and change the tag to some other icon name, and it shows correctly in the lvproj file :-)

    (But I have the GDS installed!)

    Good find!

    I wonder if there is a native tag to point to a glyph?

  13. I didn't save it, but it's pretty simple:

    Get subset of data starting with many zeros (it is black line) - I had to remove one or two starting zeros to get straight image. Now for 1024 times (32*32) scan for 3 integers and join them with "RGB to Color.vi". You'll get 1024 long U32 array. Reshape it to 32x32 and draw as unflatten pixmap.

    But this image doesn't look like icon - it hasn't a border. I think that icon is coded within NI.Lib.Icon tag - there is no NI_IconEditor tag in classes I made in 8.2

    Thanks Daklu :shifty:

    Vugie

    Are you a genius? I think so!

    Thanks I understand what you mean now - great description

    That is the banner for the library you have reconstructed.

    Here it is:

    post-10325-126097355266_thumb.png

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.