Macro to Create Plan View Camera (under View > Named Views)
Macro to Create Plan View Camera (under View > Named Views)
(OP)
I am in need of a VBA macro that creates a camera for a standard, 3rd angle projection, plan view (Looking in -Z, +Y is up, +X to the right), then I need to "activate" that view (so the part orients to the camera created)...but I a not sure where to start.
-I have point coordinates where I could set my ViewPoint3D (if that is possible)
-The -Z is the SightDirection
-The +Y is the UpDirection
Any help would be greatly appreciated.
-I have point coordinates where I could set my ViewPoint3D (if that is possible)
-The -Z is the SightDirection
-The +Y is the UpDirection
Any help would be greatly appreciated.





RE: Macro to Create Plan View Camera (under View > Named Views)
There is a macro called DMUInfEngineeringView.CATScript in the on line help file, maybe it will help you.
Regards
Fernando
https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...
RE: Macro to Create Plan View Camera (under View > Named Views)
This was exactly what I needed! I modified the "custom" view to the vectors I needed, and had to comment out the type on the Viewer3D (function marked as restricted) and it worked perfectly! Thanks!
Where are all these example scripts stored? I had to search for the file name you posted.
RE: Macro to Create Plan View Camera (under View > Named Views)
Regards
Fernando
https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...
RE: Macro to Create Plan View Camera (under View > Named Views)
RE: Macro to Create Plan View Camera (under View > Named Views)
Do you have code we can look at?
indocti discant et ament meminisse periti
RE: Macro to Create Plan View Camera (under View > Named Views)
So I would use the code above to orient to the plan view, create my annotation set, then I used the following code to create the view:
oSelection.Clear
oSelection.Add oPlane
oRefPlane = oSelection.Item(1).Reference
oView = oTPSFactory.CreateView(oRefPlane, 1)
oView.Name = "View Name"
oSelection.Clear
The view is created but the text was bout oriented properly. Horizontal was in the Y (up). There is a field in the TPSview definition (I'm using V5 R22) that allows you to align the horizontal of the view to a line...not sure how to access that in VBA though. The chm does not give good information on TPSViews.
RE: Macro to Create Plan View Camera (under View > Named Views)
I used this axis in the creation of the view.
That was a while ago... have to go back to code to find out, but wont be able to share code (sorry)
indocti discant et ament meminisse periti
RE: Macro to Create Plan View Camera (under View > Named Views)
RE: Macro to Create Plan View Camera (under View > Named Views)
indocti discant et ament meminisse periti