Skip to main content

I am wanting to set the twist angle on an existing viewport, I see twist angle in the DWG reader but I am having trouble finding how to identify the viewport in autocad since they are not named, can I use viewport order and only rotate view port with same order? After that I think it is simply a matter of inserting the proper attribute on export but I am not sure what the name of the attribute is.

Hi @garydlester,

Looking at the AutoCAD Documentation, you should be able to specify the Twist Angle by exposing the autocad_viewport_twist_angle format attribute and setting the value (64-bit floating point number). Alternatively, you could use an AttributeExposer to expose the autocad_viewport_twist_angle format attribute since you mentioned that you are reading from a DWG as well - if you want this value to be the same from the reader, you may need to expose it in the Reader Feature Type Properties in order to expose the twist angle value.

It may be helpful to take a quick look at the Working With AutoCAD Layouts article as it provides a sample workspace and some helpful info about creating a viewport in FME.

Hope this helps!


Hi @garydlester,

Looking at the AutoCAD Documentation, you should be able to specify the Twist Angle by exposing the autocad_viewport_twist_angle format attribute and setting the value (64-bit floating point number). Alternatively, you could use an AttributeExposer to expose the autocad_viewport_twist_angle format attribute since you mentioned that you are reading from a DWG as well - if you want this value to be the same from the reader, you may need to expose it in the Reader Feature Type Properties in order to expose the twist angle value.

It may be helpful to take a quick look at the Working With AutoCAD Layouts article as it provides a sample workspace and some helpful info about creating a viewport in FME.

Hope this helps!

Nice one I had almost given up, I will try this out and let you know the result.


Hi @garydlester,

Looking at the AutoCAD Documentation, you should be able to specify the Twist Angle by exposing the autocad_viewport_twist_angle format attribute and setting the value (64-bit floating point number). Alternatively, you could use an AttributeExposer to expose the autocad_viewport_twist_angle format attribute since you mentioned that you are reading from a DWG as well - if you want this value to be the same from the reader, you may need to expose it in the Reader Feature Type Properties in order to expose the twist angle value.

It may be helpful to take a quick look at the Working With AutoCAD Layouts article as it provides a sample workspace and some helpful info about creating a viewport in FME.

Hope this helps!

@chrisatsafe I added the necessary attributes and now the workspace creates the viewport but the rotation is not set and the viewport is created at 0,0 in paperspace. I am needing to rotate the viewport clockwise 32 degrees so I am calculating the rotation as 360-32= newRotation. also the scale and viewport_view_center attributes seem to have no effect, am I using the wrong writer?

geodatabase_file2acad.fmwt


Hi @garydlester,

Looking at the AutoCAD Documentation, you should be able to specify the Twist Angle by exposing the autocad_viewport_twist_angle format attribute and setting the value (64-bit floating point number). Alternatively, you could use an AttributeExposer to expose the autocad_viewport_twist_angle format attribute since you mentioned that you are reading from a DWG as well - if you want this value to be the same from the reader, you may need to expose it in the Reader Feature Type Properties in order to expose the twist angle value.

It may be helpful to take a quick look at the Working With AutoCAD Layouts article as it provides a sample workspace and some helpful info about creating a viewport in FME.

Hope this helps!

@chrisatsafe I think I found the issue, the attributes need to be added in the order they are listed in the documentation.


@chrisatsafe I think I found the issue, the attributes need to be added in the order they are listed in the documentation.

@garydlester, awesome! Glad to hear you were able to get it to work.

@chrisatsafe I think I found the issue, the attributes need to be added in the order they are listed in the documentation.

Hi @garydlester​ , do you still have that script ? I'm trying to set the rotation in view port and it keeps messing up where I want the viewport centered. Thansk!


Reply