Hi Khalid,
if you read the manual carefully, you will notice the note "This loop only assigns to inLink incoming link values for which the source object is loaded; unloaded links are
not detected."
Links are stored with their source object (i.e. as outgoing links). At the other end of the link, there is no information about the link except that there is an incoming link. This is why you have to use the other loop first:
// for each source
for srcModName in Object tgtObject <- (string linkModName do {
...
}
This gives you the names of all the modules where there exist links to the object you are looking at.
Once you have loaded these modules (e.g.
read(srcModName)
), you can loop over the actual inlinks as in your code.
------------------------------
Malte Plath
------------------------------
Original Message:
Sent: Thu February 02, 2023 11:50 AM
From: Khalid KASSI
Subject: Looping over inlinks issue
Hello all,
I'm trying to loop over all the inliks of a given module, but nothing is outputed although the inlinks exist.
here is my script
Link inLink
Object obj
for obj in current Module do {
for inLink in obj<-"*" do {
print("sh")
}
}
Thank you
------------------------------
Khalid
------------------------------
#Sustainability
#EngineeringRequirementsManagement