Jump to content

VI scripting - Filling LVClasses


Recommended Posts

Hi,

I'm currently trying to create a LV Project out of an ".uml" code. It's just meant to be created as a dummy or template for the very beginning.

But I'm stuck now. I can create the Project, the classes and also virtual Folders to the Project. But if I try to generate the Folders IN the .lvclass, it won't work. It just doesn't create it, I don't even get an error for it.

 

Did anyone maybe tried something similar and can help me?

Thanks for helping.

Forkenzer

create folder.png

create class.png

Edited by Forkenzer
Link to comment

Look at the the OpenGDS (http://opengds.github.io/)

It creates classes based on the UML modeller.

The UML modeller can import XMI files and from there you can create the classes.

It supports analysing and creating your classes, it's open source and you can see how it's done. in e.g. the VI:
LabVIEW 20XX\resource\Framework\Providers\Open_GDS\ClassProviders\Provider_LvNativeClass\ClassWriterNative_class\CreateClass.vi

View the videos here to learn about the tool:

//Mike

 

 

Link to comment

That's strange, I was able to add a folder to a class in the same method you are. I attached the project I used which basically shows the same thing.

Check the name property of LV Reference 2 before you try to add a folder to it. If the Name is the class you are trying to write to, I bet you aren't saving the project after adding the folders which is why you don't get an error (because the folders are created) but why they don't show up (the project is never saved).

Script Class Folder.zip

Link to comment

@jacobson: I get an error trying it like you did (just using "owned items". Both references have the same names for it, so there shouldn't be a difference though). I do save the project but because of the error I'm getting now, the program isn't going through this state anymore but stops itself.

@MikaelH: It's not working that the folders (filled with VIs) show up under the class. I can generate the folders with VIs in the project but not as a part of the class. I'm saving everything all the time. I attached the created project structure to show.

 

BTW the project is not saved now because of an error. It now tells me the error code 1562: "The specified project or library is locked."

Project structure.png

Edited by Forkenzer
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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