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.

Load symbol - explode with out exploding blocks

Started by aqua, February 10, 2007, 05:31:33 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

aqua

Designcad 13

I want to merge 2 drawings.
The second drawing will be loaded as a symbol.
Sometimes - the second drawing will contain grouped items, symbols or blocks

One then has to explode the second drawing - so one can get access to individual items

Unfortunately - grouped items, symbols or blocks taht were within the second drawing are also exploded.

Is it possible to load then explode a symbol - without exploding the inbuilt item?

Regards Frank

DrollTroll

As best I recall, I don't think that's possible in Version 13 -- explode is all-or-nothing. In a later version of DesignCAD (15 or 16, perhaps?) we added a Preferences setting to Explode Top Level Only.
25 years with DesignCAD

Lar

Frank, if you're gonna explode it anyway then just load as 'original entities' or  paste it in. That way everything will come in intact.

Lar

aqua

Have gone with the copy and paste method
Should work in theory.
Not sure if it is fully robust - seem to struggle on some large drawings - macro just stops and waits midstream




'FTM-11/2/2007
'Disable access to other functions
sys(470) = 1

'identify existing layer
el = sys(3)

'If existing layer = 102, change existing/current layer to 1
if el = 102 then sys(3)=1
sys(3)=1

'Turn on silent mode
SYS(36)=1

'Make sure layers 100 & 104 are visible and editable
layer(100)=6
layer(104)=6

'Make sure no items selected
sys(80)=0

'If item on either layer 100 or 104 then show message
>SelectLayer
{
<Layer [100]
<Layer [104]
}
If Sys(80) > 0 Then
Message "Your drawing contains an image that may be effected by the working plane rotation reset - you may need to reset the working plane and then delete and reload the image"
'Make sure no items selected
SYS(80)=0
END IF

>UnWorkplane
{
  }

>FitToWindow
{
  }

>Regenerate
{
}

Message "Now locate other drawing to be merged with the current drawing, then click OPEN."

'Open 2nd drawing
>Open
{
  }

'Show all layers
for i = 1 to 400
layer(0+i)=6
next i

'Make sure no items selected
sys(80)=0

'If item on either layer 100 or 104 then show message
>SelectLayer
{
<Layer [100]
<Layer [104]
}
If Sys(80) > 0 Then
Message "Your drawing contains an image that may be effected by the working plane rotation reset - you may need to reset the working plane and then delete and reload the image"
'Make sure no items selected
SYS(80)=0
END IF

>UnWorkplane
{
  }

>FitToWindow
{
  }

>Regenerate
{
}

'Identify extremes of second drawing
a =0
a=sys(120)
b=0
b=sys(121)
c=0
c=sys(122)
d=0
d=sys(123)

Message "The GPS points in the just opened drawing will be moved from layer 2 to 102. Layer 102 will be hidden in the merged drawing"

'Make sure no items selected
sys(80)=0
'
'Make sure layers 2 are visible and editable
layer(2)=6
>Selectlayer
{
<Layer [2]
}

'Move items on layer 2 to 102
for j = 1 to sys(9)    
  getattr j, type, select, layr, group, red, green, blue
if layr = 2 and select = 1 then layr = 102
  putattr j, type, select, layr, group, red, green, blue
  next

'Make sure no items selected
Sys(80) = 0

'Select all items in second drawing
>SelectAll
{
  }

>SetHandle
{
  <PointXYZ [a, b, 0]
  }

>Copy
{
  }

'Close 2nd drawing
>Close
{
  }

'Paste 2nd into first
>Paste
{
  <PointXYZ [a, b, 0]
  }
'Hide layer 102
layer(102)=0
'Make sure no items selected
Sys(80)=0

>Fittowindow
{
}
'Return to original layer
sys(3)=el
'Turn off silent mode
sys(36)=0
End