Default Visual Components layout format (*.vcmx) contains full component structures as copies, not as references. Only the geometry features - that are read from files - are referenced in order to minimize the layout file size.
This approach has pros and cons. The relatively small file size is a pro, so is the fact, that component structure and functionality can be tailored in a layout. However, the fact, that the components are not fully referred can be both misleading and sometimes even undesired.
The attached example demonstrates how the layouts can be stored and populated from a simple xml file format with help of full referencing.
The sample is simplified and does not support any layout items such as dimensions or annotations. Nor does it support layouts with customized components or robot programs. However, those functionalities can be added depending on the capabilities and requirements of the project.
Especially this example serves as a way to connect different design systems together e.g. with help of a PDM system
To install the add-on,
extract the zip-file in:
C:\Users…\Documents\Visual Components\4.0\My Commands
(let the files be in a subfolder)
Restart the software and you will find the XML tools in the home context’s ribbon tab.
Open up a sample layout and then try to export XML file. Clear all and then try to import the exported XML file.
XML.zip (5.43 KB)
Elements of the XML files:
GlobalIdentity is referring to VCID in the eCat. All the models that are listed in a XML file must be found in the eCatalog by that VCID. The components can be any component of the Visual Components Public Models – library or any other component that is saved (-> that means that it has unique VCID) and is linked into the eCatalog Sources
LocalIdentity number is used locally to link the connections and the attachments between components to the correct components inside the xml file
Name of the component must be unique in one layout. If there are more components within the same layout, they are separated with space + “#” + index_number, like “GenericFence”, “GenericFence #2”…
Properties do not need to be included in the xml file, if the property values have not been changed from the default values (property values when saved).
o N - Defines Normal vector that is unit vector in X-axis direction.
o O - Defines Orientation vector that is unit vector in Y-axis direction.
o A - Defines Approach vector that is unit vector in Z-axis direction.
o P - Defines Position vector.
o Note: The directional vectors N,O and A should be unit vectors and orthonormal. That is, the length of N,O and A should be 1.0, and they should be normal to one another (orthonormal). Otherwise, the vcMatrix object will be skewed.
Connections are connected physical/abstract interfaces between components. Interface is a behaviour object in a component which can deliver various types of simulation specific information, such as:
o Material flow
o Communication signals (digital / analogue / messages)
o Task publishing
o Node/Tool/Base information
o Physical attachment information
Attachments are the hierarchal parent/child –relations between components
i think this is a great aproach to save files. And i LOVED this!!!
But maybe some more functions needed to be added:
- If component isnt in eCat it should be saved as new component ,where xml file is created.
- Interfaces and signals should be saved in xml file too.
Hope my feedback gives you any better ideas. And thanks for the share.
Thank you for your feedback.
These are nice ideas for improvement.
Hope you share those improvements too i m really intrested in your add on. And also with your approuch it can allow us to make changes on components in big layouts without waiting for opening whole layout.
I would like to transform my python robot program in XML file. You said it’s possible in your description. Could you give me more details? thank you in advance