Skip to main content
Solved

AutoCAD - trouble with autocad_viewport_handle attribute

  • November 4, 2025
  • 1 reply
  • 41 views

k_lander
Contributor
Forum|alt.badge.img+9

I am trying to validate some properties of objects in DWG files, and some of the things I’d like to check require me to know what paper space viewport an object is visible through, but I have been unable to get the autocad_viewport_handle attribute to show up.

I’ve tried a few combinations of reader parameters, including checking all boxes in the “Model and Paper Space Options” section, unchecking some options while leaving “Read Model Space Entities Through Viewports” checked, and tried reading multiple DWGs, but so far I have not had any luck. I am thinking this must be a “me” problem, but I’m kind of at a loss. Is there a certain set of parameter settings required to get autocad_viewport_handle to show up? I am setting the reader to expose the attribute, but so far, it is always missing. I’m using FME 2025.0.

 

Best answer by k_lander

I’ve had some time to dig into this a bit more, and I think I may have found the source of the issue: looks like the clipping plane/view target Z setting of the viewports may be what’s affecting FME’s ability to resolve entities through them.

I tried a new set of files, and the entities as viewed through the viewports in them showed up with the autocad_viewport_handle attribute on them (until now, I had never seen these entities show up before, which explains why I had never seen the autocad_viewport_handle attribute until now). When looking at the attributes on the viewport features to try and figure out what was different about this file, I noticed these:

From a .dwg file where FME can’t resolve objects through the viewport
a .dwg where FME can resolve objects through the viewport

autocad_viewport_view_target_z is not set to 0 for the file in which FME can’t seem to resolve entities through the viewport, and the view direction vector is also very different. I’m not sure what the best practice would be for addressing this with existing viewports, but after much searching, I was able to get one of these non-working viewports to start working by attempting to change its Target Z setting via the 3DCLIP command. New viewports created at elevation of 0 also seem to work.

That’s a long winded explanation of what I’ve found, hopefully this helps if someone else has this problem.

1 reply

k_lander
Contributor
Forum|alt.badge.img+9
  • Author
  • Contributor
  • Best Answer
  • November 6, 2025

I’ve had some time to dig into this a bit more, and I think I may have found the source of the issue: looks like the clipping plane/view target Z setting of the viewports may be what’s affecting FME’s ability to resolve entities through them.

I tried a new set of files, and the entities as viewed through the viewports in them showed up with the autocad_viewport_handle attribute on them (until now, I had never seen these entities show up before, which explains why I had never seen the autocad_viewport_handle attribute until now). When looking at the attributes on the viewport features to try and figure out what was different about this file, I noticed these:

From a .dwg file where FME can’t resolve objects through the viewport
a .dwg where FME can resolve objects through the viewport

autocad_viewport_view_target_z is not set to 0 for the file in which FME can’t seem to resolve entities through the viewport, and the view direction vector is also very different. I’m not sure what the best practice would be for addressing this with existing viewports, but after much searching, I was able to get one of these non-working viewports to start working by attempting to change its Target Z setting via the 3DCLIP command. New viewports created at elevation of 0 also seem to work.

That’s a long winded explanation of what I’ve found, hopefully this helps if someone else has this problem.