...
Create new drawings
Change system variable CECOLOR
Offer basic drawing and editing tools
List and insert existing block definitions
Show custom help content
DWG Editor - Create new drawings
Status | ||
---|---|---|
|
...
Code Block | ||
---|---|---|
| ||
String m_Blocks[] = null;
public void DocumentActivated( String[] layouts, String[] blocks )
{
m_Blocks = blocks;
...
}
private void InsertBlock()
{
if ( m_Blocks == null || m_Blocks.length == 0 )
{
AlertDialog.Builder warningMessage = new AlertDialog.Builder( this );
warningMessage.setTitle( getResources().getString( R.string.app_name ) );
warningMessage.setMessage( "No blocks to insert in this drawing." );
warningMessage.create().show();
return;
}
AlertDialog.Builder builder = new AlertDialog.Builder( this );
builder.setTitle("Select block");
builder.setItems( m_Blocks, new DialogInterface.OnClickListener()
{
@Override
public void onClick(DialogInterface dialog, int which)
{
String command = "_-INSERTBLOCK\n\"" + m_Blocks[which] + "\"\n\\1.0\n1.0\n0.0\n";
CFxARESInstance.instance().runCommand(command);
}
});
builder.setNegativeButton("Cancel", null);
AlertDialog dialog = builder.create();
dialog.show();
} |
DWG Editor - Show custom help content
Status | ||
---|---|---|
|
Status | ||||
---|---|---|---|---|
|
The SDK is shipped without a command help but the standard user input shows a help button. To hide the help button just use SetUIConfigruation() from CFxARESInstance. More details read here → DWG Expert - Create a custom UI for command prompts
The delegate method onHelp() of CFxARESInstanceDelegate allows to react whenever the user taps on the help button of a certain command. The command name is provided in English only.
File: CFxARESDelegate.java
Code Block | ||
---|---|---|
| ||
@Override
public void onHelp(String command)
{
// Show custom help content
} |