Script to open file without dialogbox for command DBCIMPORTTS

Script to open file without dialogbox for command DBCIMPORTTS

Anonymous
Not applicable
1,000 Views
3 Replies
Message 1 of 4

Script to open file without dialogbox for command DBCIMPORTTS

Anonymous
Not applicable

I want to open a template via a toolpalette with a customized command.

To open the template i need to use the command DBCIMPORTTS

^c^c^p_dcimports C:\Map\file.extension     doesn't work.

 

Who can help me?

0 Likes
1,001 Views
3 Replies
Replies (3)
Message 2 of 4

Ed__Jobe
Mentor
Mentor

In order to specify a file like that, there needs to be a command line version of the command. It starts with a hyphen. Otherwise, when the dialog pops up, control switches from the command line to the dialog. In this case, the command doesn't have a corresponding command line version.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 3 of 4

Sea-Haven
Mentor
Mentor

Not sure but maybe can be done using the VBA sendkeys method.

0 Likes
Message 4 of 4

ambrosl
Autodesk
Autodesk

Unfortunately, there is no command line support for DBCIMPORTTS and many of the other Database Connectivity (dbC) related commands.  While a different workflow, you can't import the Link Templates directly, you could use the Connectivity Automation Object (CAO) library to create the Link and Label Templates in a drawing with a programming language like AutoLISP, VBA, or VB.NET.  From there, you could then use the exposed macro/command and execute it from a Tool Palette.

 

Sample projects of using the CAO library with AutoLISP and VBA can be found in the Sample\Database Connectivity\CAO folder under your AutoCAD installation.  I did an AU session a few years ago that demonstrates how to use the CAO library with VB.NET, that session was named Harnessing the Power of the AutoCAD COM APIs and is available on the AU website.

 

For additional information on the CAO library, see ActiveX: Connectivity Automation Object Reference in the AutoCAD developer documentation.



Lee Ambrosius
Senior Principal Content Experience Designer
For additional help, check out the AutoCAD Developer Documentation
0 Likes