Jump to content
Sign in to follow this  
Mikaymikz

Dialogue Value to Record: Possible?

Recommended Posts

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

Share this post


Link to post
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.

Share this post


Link to post

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

Share this post


Link to post

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 :D).

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

Share this post


Link to post

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.

Share this post


Link to post

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.

Share this post


Link to post

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

Sign in to follow this  

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...