I'm wondering if there is any solution for my problem:
In CatiaV5, is it possible to change the external reference link using an Visual Basic (catvba or catscript) macro?
For every CatPart or CatProduct we have an external link to reference like in the picture below:
Thank you very much!
The Link to Reference cannot be altered by API (VBA/CATscript). It is a read-only attribute which shows:
the full path of the save location if data is stored filebased:
"C:\TEMP\part1.CATPart"
example with filebased
some ID or name attribute if data is stored on a database system (like enovia VPM)
17_83032|00_A02_-___BROKEN_DRW_LINKS example with database
However, the Link to Reference will change if you save the part/product to a new location with save as - as also stated here.
Related
I know that MS Word allows users to choose how they want the paste to be depending on whether the pasting is from another software or same document or a different document. Is it possible to obtain that content source information from VBA? Thanks!
If you want to get information about a source of data in the clipboard, comming form outside application - sorry, it's impossible.
MSDN wrote:
The clipboard is a set of functions and messages that enable
applications to transfer data. Because all applications have access to
the clipboard, data can be easily transferred between applications or
within an application.
The function to get such of information does NOT exist!
Note: that VBA can get some information via OleAutomation (COM):
This overview does not describe how to copy and paste linked or
embedded objects. For information on these subjects, see the Component
Object Model (COM) documentation.
More information about VBA + Clipboard you can find here: Visual Basic for Applications/Clipboard VBA
I created a database on access and added the data source to my visual studio vb project. However, I have recently added some new fields and tables on my database, how do I update it on my visual basic project without having to delete it and add it as a new data source which caused problems to my programs integrity ?
You can re-run the wizard and update the DataSet schema from the Data Sources window. I'm not in a position to test right now but, if memory serves, you can right-click the specific Data Source and select the appropriate item from the menu. If not, it would be a button on the toolbar in that window.
I don't think you need to change the data source, as the data source just refers to the database which has not changed. Ideally, the changes within the database should have reflected in the appropriate DataSet or DataCoulmn in your code. Can you post the code here, so that we can understand exactly what is going wrong?
I am creating a library application in Visual Studio 2010 Professional and Access 2010. I bind the Access database to Visual Studio. When I fill out the fields and click submit I can see the new record in the DataGridView, but when I close the application the new record is not saved and I have to input the record again.
Can somebody help me to know why when I input the new record through the application the record is not saved in the database?
It is a very common situation. You have your database file (the MDB or ACCDB file) listed between your project items. If you click on this file and look at the properties window you will see a property called Copy to the output directory. If this property is set to Copy Always then every time you start a debug session the database file listed in your project items is copied by VS in the output directory (usually BIN\DEBUG). Of course this copy doesn't contain the records inserted in your last debug session and you think that your previous insert has failed.
Setting this property to Copy If Newer, the mentioned behavior will happen only if you change the database schema manually.
Setting this property to Copy Never, will let you manually copy the database file.
Good Afternoon,
I am in the process of developing in vb.net a simple “cheque printing” application which will allow users to fill in a few text boxes with the values that will be printed on a cheque.
When they hit the print button, the values will be sent to the printer, but I also want the values they input in the text boxes saved to a file, so like a history file of all the cheques that were created.
I am thinking to use either an access database or an excel spreadsheet as my history file, but I am not quite sure on which would be best.
Please note that in my environment storing this information in a SQL database is not an option and also this file will most likely be stored/accessed from the network.
The history file needs to be:
1.Stable (cannot corrupt easy)
2.Reliable
3.Easily exportable in case we need to export the information to one of our in-house systems.
4.editable from the application I am developing
Kindly advise,
A
XML. Save the data to DataTable object and then use the .WriteXML method to save it as an xml file. I'd advise creating a strongly-typed DataTable class for this, so that the XML can be exported with a reliable schema and imported easily.
If you are using different fonts, you could use a .rtf (rich text format) which will save the format of the text that you send to print... it is a universal file format, you can open it with open office, ms office, or any office suite you have...
Access will be best choice,
it's relational database and can make a form from this file to do what are you looking for without VB or any code.
Also you can access this file from network.
for more detail about setting for this file go to this link
http://goo.gl/bOfGp6
and you will find more options complete your work.
I would use a MySQL server. It's free.
XML is also good, but I hate sharing folders...
I've read that the attachment data type in MS Access should only be used if the database will be use within SharePoint.
Could someone recommend an alternative to this data type? I'm developing a database for users to submit entries and they would like the option to attach notes/pictures with some of the entries.
Generally, I find that storing a path to the file you want to attach is the best option, if it is viable.
If they are images, the image control now has a ControlSource property, so you can bind it to a field in the table that contains the path.