Jump to content

vugie

Members
  • Posts

    393
  • Joined

  • Last visited

  • Days Won

    32

Posts posted by vugie

  1. I have one more question regarding this topic, do you think if it is possible, to use the Bezier curve for finding propert path through the mark points?

    Generally there are two kinds of things: possible and expensive :)

    I think that Bezier curves falls under the second category. Besides that they does not serve for path finding. Rather for mathematical representation of complex curves.

  2. I want to have a class control in my controls palette. When I try to point .lvclass file in palette editor nothing happens.

    I'm only able to add it to the palette with following code:

    post-7450-005802600 1286973963_thumb.png

    (note "World.ctl" after lvclass path)

    With this method control appears in the palette as big quotation mark (same as when item is not found), but works good.

    Is there any "normal" method to add .lvclass to palette?

  3. That is very cool indeed, on several levels...

    From the screencast (or rather the bit of code I can see) it looks like you are using the 3d picture control. Is this easy to pick up? I have been tinkering around lately with a 100% G based 3d renderer (not getting very far unfortunately).

    Yes, it is pretty straightforward if you are familiar with OpenGL concepts, however it is poorly documented - particularly for recently added features. There are some limitations which are hard or impossible to overcome - they concern mainly interactivity. There are also some performance issues - it mainly concern when control is embedded in VI (as opposed to separate window for 3D only).

    I use 3D Picture very intensively in my projects an it serves very well as a scientific visualization tool without bells and whistles.

    Writing your own realtime renderer doesn't make sense (other than fun). It hardly does even in C. I wrote something like an offline raytracer/renderer (but for terahertz radiation), but the performance was very poor and I moved the core part of the engine to C.

    What make sense is writing a wrapper to one of existing 3D engines (there are hundreds of them - Crystal Space, G3D, VTK, IrrLicht, Ogre - to name a few of most popular). It is hard work, half by half in C I suppose. I tried to strat it, but I gave up. I remember that somebody here on LAVA said that he made some wrappers for VTK...

  4. Sorry, but if your class is public and you have full access to all contents,

    it might be a bug.

    Actually jgcode pointed me to already filled CAR #185059 on similar issue. It concerns VIs which are member of a class whiech belongs to lvlib. LogMAN, you did your test for lvproj, probably if you would try it for lvlib, you'll get similar issue...

  5. They are public and their class is public as well. I'm able to drag them from palette and use normally.

    In the subpalette of this palette there are some VIs from the same class and they appear without such glyphs.

    This palette looks the same after restarting LabVIEW and when installed on second computer.

    As an experiment I tried to change scope of some other VIs from another class and another palette to private, then I refreshed palettes and there was no change in VI appearance on the palette (no glyphs).

  6. Can anyone tell me why do I see such crosses in my palette?

    post-7450-098645500 1286263767_thumb.png

    They are in only one subpalette, palette work normally (well, almost normally - once VI's from this palette changed to ? on the DB).

    There are no such crosses during palette editing (BTW palette editor start takes about 2 minutes). I already tried rewritting mnu file with palette API.

    LV 2009

  7. You create a toe class with all required properties and access methods and a proper icon, then a foot class with all properties and access methods, ..., then a man class out of all previous ones with all access methods, then a gun class with all properties, accessors and icon, a bullet class... Then you realize that if you want to shoot yourself in the foot, the man class, the gun class and the bullet class has to has a common ancestor, because otherwise you'll have class conflict on the wire. So you create it trying not to get crazy modifying all connector panes to allow dynamic dispatching (which means that you have change almost all controls to variants), you think hard how to name this class... Finally you start creating icon for it... after five minutes you give up, take a real gun and shoot yourself in the head. In the short time the bullet flies you realize that the only advantage of using classes in this case was to have fancy color wires instead of pink ones.

    • Like 1
  8. I made once runtimeless and installerless application with LV 8.2. "Runtime" part consisted of following files:

    DNCInterface.dll [.]  mesa.dll [script] lvpng.dll [models] lvjpeg.dll [errors] OpenThreadsWin32.dll [English] copyright.txt metrics.bak  mkl_lapack64.dll   libguide40.dll niMetaUtils.msm  IgnoreProperties.dat lvrt.dll libxml2.dll logosbrw.dll nbfifo.dll iconv.dll lvanlys.dll  niini32.dll nicont.dll NationalInstruments.LabVIEW.dll

    I didn't use any VISA nor DAQmx stuff.

  9. You're going to need to modify that code even if you put in a custom error handler - currently it calls abort() regardless of whether it calls the custom error handler or not. How often does your library generate an error? Do you expect your code to be able to recover from the error? You could write your own custom error handler that posts a user event to LabVIEW, or sets an occurrence; I've never done it, but I've seen sample code. You would need a function to register the occurrence or event refnum before running any functions from the DLL that crashes.

    Yes, I found no other way than commenting out abort(), to avoid LV crash. I currently have custom error handler which records an error within a static variable and additional GetLastError function which helps to read it with LV. It works more or less - there are some strange issues but it's not the time to carry about them. But I wonder what is going on in the memory when abort() is not called... I suspect that from time to time I'll have LV crashed. And errors appears pretty often when using this library - it's a simulation framework, so it's quite normal that sometimes everything explodes - it's a sign that you have to change some simulation parameters or restitution factors.

    OK, so I modified the code of the library (the modification is inserting "//" in 3 places...). The library is dual-licensed (LGPL-BSD). No clean rules how to choose one. In the worst case I'll have to include its whole code...

  10. I'm making wrappers for certain open source library (DLL). It has its own error handling: each time when an error appears special Error() function is called with error number and message as arguments. It looks like that:

    void Error(int errnum, char *msg){  if (custom error handler defined) custom_error_handler(errnum, msg)	else DisplayDialog(errnum,msg);  abort();}

    The problem is that LabVIEW crashes each time library calls Error() function. At first dialog with error number appears (as it should), then after clicking OK windows dialog "application unexpectly quit", everything hangs for a while and LV IDE disappears... I think that abort() is not LV friendly.

    I compile the library myself, but due to maintenance and licensing issue I don't want to modify its code. I would rather like to create my custom error handler (there is a SetErrorHandler function which gets a pointer to it), which would exit somehow more softly. I'm already able to build another DLL with error handler an to provide its pointer to SetErrorHandler (using GetProcAddress function of Kernel32.dll). But how to exit softly and provide error information up to LV wrapper?

    Maybe is there a way to compile DLL in such way that abort is more LV friendly? (MSVC Express)

  11. Hi all,

    I am rotating a image without using NI Vision toolkit.

    i am rotating the image using some complex no. formulla

    but problem is when i am rotating a image the image information is loss

    i want to add some image area while rotating.

    so reply.

    Pravin, check carefully the example I referenced in this thread (yours BTW, and on the same topic). BitMan has a routine which realizes exactly what you want.

  12. When I finish installing the new package (all OK) and then select the Control Generator from the Menu it goes looking for the BitMap.lvclass - which I think? this new version removed from my LabVIEW directory. I've got the zipped up BitMan Library do I just stick this whole lot into the <userlib> folder?

    BitMan is already packaged and ready to downlad at:

    • Like 1
  13. I'm in the midst of writing code to use scripting to crawl thru huge C header files and create LabVIEW clusters out of all the structures. (If I ever get time to finish it) This will save me loads of time every time those C header files get changed.

    OT

    Cat, did you hear of SWIG? It is able to create XML with pure information about data structures and functions out of a header file.

×
×
  • Create New...

Important Information

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