News:

Please note new Forum URL: forum.designcad.com

Main Menu
DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

DXF Import - Explode Blocks settings

Started by Juergen, December 03, 2014, 07:56:32 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Juergen

When importing DXF_files there is a setup dialog (-> attachment)
Is there a way to set "Explode Blocks" by a macro or dll call?

Kind regards,

Juergen

DrollTroll

For macros (generally speaking) you can get a good idea of all the parameters available to a command by recording a macro using that command. Here's what you get for the >DwgIn command (should also apply to <DxfIn)

>DwgIn
{
  <Filename "test.dwg"
  <ExplodeBlocks 1
  <SkipHatch 0
  <SkipLayouts 0
  <UseVectorFont 0
  <ImportPointmark 1
  <ImportGenericDimensions 0
  <ImportVaryingWidthAsSingleWidth 0
  }

Remember, for variable inputs to the parameters, use [squarebrackets] around the variable names, ex.
<Filename [fname$]
<ExplodeBlocks [explode]

etc.
25 years with DesignCAD

Juergen

Hi DrollTroll,

the problem is that

DcSel.ExplodedSymbolLayer = 4
DcSel.Explode()

leads to a crash in case it is called more than two times.
Even the macro equivalent fails with the same behaviour.

Once I have marked 'Explode Blocks' in the setup everything
is fine. Do I have an option to set this via dll call or
macro?

Kind regards,

Juergen

DrollTroll

I'll have to look at the type library -- I haven't gone there in a while.

However, for macros, you can set a bunch of command parameters in a macro drawing command without actually running the command. For example, just to set the DXFIn parameter ExplodeBlocks to 1 without actually importing a file, you can use this:

'SetExplodeBlocks.d3m
' Just sets the "Explode Blocks" flag for imports
>DXFIN
{
<ExplodeBlocks 1
<NULL
}

When you run a drawing command with a NULL parameter, BasicCAD just presets the parameters for the command but doesn't actually do the command.
25 years with DesignCAD

Juergen

DrollTroll, thanks you for the idea. This works fine for me.

Kind regards,
Juergen