Hi,
I'm using a complex model with a lot of parts and others...
When I simulate (with a main macro inluding this macro), there are different model which are created and copied...
I create this macro. This macro must delete the forces of a part which are dependent of this part. This macro is used in the last model created.
example:
!USER_ENTERED_COMMAND macro1
!WRAP_IN_UNDO NO
!
!I defined in the main macro which "$seg" I need
!like "nameofseg"
!
! $seg:T=string:C=0
!
variable set &
var = $_self.segments &
string = $seg
!
for var = incr start = 1 end = (eval(DB_COUNT($_self.segments.self,"string_value")))
!
force delete &
force_name = (eval(DB_DELETE_DEPENDENTS( eval($_self.segments[incr]) ) ))
!
end
If I use this macro within simulation, no problem: it works! But, in the simulation (included in the main macro), I have this error message:
ERROR: Error detected on line number xx (line force_name...), character xx of the macro '.macro1'.
ERROR: There is more than one database object named "nameofseg"
ERROR: There is more than one database object named "nameofseg"
ERROR: The command was not executed.
ERROR: +1&> force_name = (eval(DB_DELETE_DEPENDENTS(.macro1.segments[incr]) ))
Any suggestions would be appreciated,
thX a lot,
Djo
I'm using a complex model with a lot of parts and others...
When I simulate (with a main macro inluding this macro), there are different model which are created and copied...
I create this macro. This macro must delete the forces of a part which are dependent of this part. This macro is used in the last model created.
example:
!USER_ENTERED_COMMAND macro1
!WRAP_IN_UNDO NO
!
!I defined in the main macro which "$seg" I need
!like "nameofseg"
!
! $seg:T=string:C=0
!
variable set &
var = $_self.segments &
string = $seg
!
for var = incr start = 1 end = (eval(DB_COUNT($_self.segments.self,"string_value")))
!
force delete &
force_name = (eval(DB_DELETE_DEPENDENTS( eval($_self.segments[incr]) ) ))
!
end
If I use this macro within simulation, no problem: it works! But, in the simulation (included in the main macro), I have this error message:
ERROR: Error detected on line number xx (line force_name...), character xx of the macro '.macro1'.
ERROR: There is more than one database object named "nameofseg"
ERROR: There is more than one database object named "nameofseg"
ERROR: The command was not executed.
ERROR: +1&> force_name = (eval(DB_DELETE_DEPENDENTS(.macro1.segments[incr]) ))
Any suggestions would be appreciated,
thX a lot,
Djo