Guest
|
Posted:
Wed Nov 16, 2005 9:10 pm Post subject:
Command to drop a shared cell? |
|
|
I am trying to drop a specific shared cell to a normal cell so that I
can then batch process replacing some text. This has to be done on 300+
files, so there can't be any user intervention. I have everything
working except for dropping the shared cells to normal cells. I found
this macro posted below, but it causes all of my tags to disappear? Is
there a way to modify this to select a specific shared cell by name or
is there some way to keep it from loosing all of my tags? Any input
would be greatly appreciated
Thanks,
Paul
Const STARTofFILE% = 0
'-----------------------
'VARIABLES
'-----------------------
Dim element As MbeElement
Dim filePos As Long
Dim origin As MbePoint
Dim endOfFile As Long
Dim aantal as Long
'-----------------------------------------------------------
'subroutine ProcessEinde
'-----------------------------------------------------------
Sub ProcessEinde
MbeSendCommand("NULL")
MbeStartDefaultCommand
MbeWritePrompt "The macro is stopped, " + cstr(aantal) + " elements
are dropped"
MbeSendCommand "ECHO"
End
End sub
'-----------------------------------------------------------
'Main
'-----------------------------------------------------------
Sub Main
Set Element = New MbeElement
aantal = 0
endOfFile = MbeDgnInfo.endOfFile
filePos = element.fromFile(STARTofFILE)
'Set a variable associated with a dialog box
MbeSetAppVariable "DROP", "dropOptions.sharedCells", -1&
MbeSetAppVariable "DROP", "dropOptions.sharedToNormal", 1&
While filePos < ENDofFILE AND filePos >= 0
If (element.type = 35) Then
If element.getOrigin(Origin) = MBE_Success Then
aantal = aantal + 1
MbeSendCommand "DROP sharecell "
MbeLocateElement filePos,filePos,0,origin
MbeSendDataPoint 0,0,0,1
End if
End If
filePos = element.fromFile(filePos + element.fileSize)
Wend
ProcessEinde
End Sub
|
|