Select PdfReferences from PdfDefinition ObjectID's

Select PdfReferences from PdfDefinition ObjectID's

deheylen
Contributor Contributor
799 Views
2 Replies
Message 1 of 3

Select PdfReferences from PdfDefinition ObjectID's

deheylen
Contributor
Contributor

I want to iterate through the PDFUNDERLAY dictionary and select the pdfReference(s) for each definition. Since the LISP entget entity list for pdf references include a hard pointer to the pdf definition (DXF 340  assoc pair), I thought I could use the TypedValues (DxfCode.Start, "PDFUNDERLAY") and (DxfCode.HardPointerId, defPDF.ObjectId) in an ed.SelectAll statement.

 

When I run this code however, the HardPointerID value is ignored and all PdfRefs are always selected for every SelectAll call. Does anyone know why this doesn't work or have any alternate ways to provide this functionality? I have attached the procedure as a screen shot.

 

0 Likes
Accepted solutions (1)
800 Views
2 Replies
Replies (2)
Message 2 of 3

Virupaksha_aithal
Autodesk Support
Autodesk Support
Accepted solution

Hi,

 

I am not sure what you are trying.... but if you wish to get all reference of a PDF underlay, then you can use "GetPersistentReactorIds" API on the PDF definition to get all its references. refer blog https://adndevblog.typepad.com/autocad/2016/07/unload-all-the-pdf-underlay.html which use same technique to get the references.

 

 



Virupaksha Aithal KM
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 3 of 3

deheylen
Contributor
Contributor

Virupaksha,

That was exactly what I needed. I had actually looked at the post you referenced but  I was thrown off by the PersistantReactorIDs, which I'm not familiar with. Thank you for the help.

0 Likes