EBDN - Community - Question & Answers

  Thursday, 30 March 2023
  4 Replies
  1K Visits
I have the problem that hyperlinked external pdf's are not within my result-pdf

What I do is the following:
Having a list of Device names named devtypelist containing:
Antriebe (nicht elektrisch) (Prozess / Fluid)
Pumpe (Prozess / Fluid)

I walk through all devices and query for the device id's

List<long> devids = new List<long>();
FilterExpression filter = mApp.CreateFilter();
filter.Kind = ObjectKind.DeviceType;
ObjectCollection oc = mApp.Folders.TypeDefinitions.FindObjects(filter, SearchBehavior.Hierarchical, true);
foreach (ObjectItem row in oc)
string name=row.Name;
string fullname = row.FullName;
string id = row.Id;
ObjectType typeid = row.TypeId;
string bomrelevant = row.Attributes.GetAttributeValue(AttributeId.TypeId); // Wirft Exception wenn attribut nicht verfügbar
long devid=long.Parse(bomrelevant);


Using that list I set the Export2PDF automation parameters:
21: true // Determines whether hyperlinks should be inserted to result pdf.
22: devids.ToArray() // List of Device Types with hyperlinks.
23: true // Determines whether local files in hyperlinks should be attached as pdf files to result pdf.

But this doesnt seem to be all. Wahrt am I missing ? Thanks for feedback!