Mikaymikz Posted November 4, 2014 Share Posted November 4, 2014 Hi all! Can someone please tell me whether it is possible to get values from a dialogue and input those directly to a Record Format without attaching it to an object? If yes, can you please give me a tip about what function to use? Thank you in advance! Sincerely, Mikaymikz Quote Link to comment
Hippocode Posted November 4, 2014 Share Posted November 4, 2014 Hi all! Can someone please tell me whether it is possible to get values from a dialogue Yes you can. If you just need a simple string or integer vs has some functions that will return one value. If that's not sufficient you'll need to code your own dialog manually. look under "Dialogs - Predefined" @ vs function reference and input those directly to a Record Format without attaching it to an object? A record is a resource, you can always change the default values. Objects placed in the drawing that have this record attached won't be updated. If you place new objects they will use the new default values as you changed them. I think GetObject(RecordName) will return a handle to the record. Quote Link to comment
MullinRJ Posted November 4, 2014 Share Posted November 4, 2014 Mikaymikz, The call you want is: NewField(RecordName, FieldName, Num2Str(0, IntVal), 1, 0); { Integer } This will create a new field or or overwrite an existing one. Different options will create different data types. HTH, Raymond Quote Link to comment
Mikaymikz Posted November 5, 2014 Author Share Posted November 5, 2014 Thank you for your advice MullinRJ and hippothamus! I appreciate it. One more question though, if you don't mind (or probably more to follow after this ). Is it possible to Write values to a database table without going through a record format? I am currently unsure how to use the following functions. 1. DBObjSQLSetWrite 2. DBObjSQLGetWrite I don't think I can use Function:DBSQLExecuteDSN for this, or can I? Thank you soooo much! Sincerely, Mikaymikz Quote Link to comment
Hippocode Posted November 5, 2014 Share Posted November 5, 2014 I have no experience with databases but there have been some active topics about it recently. I even came across a pdf with instructions so these might give you the answers you need. Quote Link to comment
Vectorworks, Inc Employee Alexandra Beshevlieva Posted November 12, 2014 Vectorworks, Inc Employee Share Posted November 12, 2014 Hello Mikaymikz! DBObjSQLSetWrite sets the SQL sentence used to update data from object to database. This is not your case. DBObjSQLGetWrite gets the SQL sencente used to update data from object to databsse. This is not your case either. DBSQLExecuteDSN executes a query directly to the specified datasource name. You send the DSN name, username, password and query as input parameters. That is your case Here is and example how to use it. DBSQLExecute is like the function above but you pass as parameter only the datasource name and it must be registered to the ODBC manager earlier. 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.