Author Topic: Create Clipped Viewport without MVIEW command  (Read 1615 times)

0 Members and 1 Guest are viewing this topic.

jtoverka

  • Newt
  • Posts: 127
Create Clipped Viewport without MVIEW command
« on: August 31, 2019, 08:21:41 PM »
How would I be able to create a clipped viewport in AutoCAD using visual lisp and AutoCAD's object model? I have scoured the object model and I cannot find an equivalent way to reproduce the following code.

Code: [Select]
(command "._MVIEW" "OBJECT" ent)

jtoverka

  • Newt
  • Posts: 127
Re: Create Clipped Viewport without MVIEW command
« Reply #1 on: September 18, 2020, 10:31:03 AM »
I still haven't found the answer to the question above. I can live without viewport clipping.

Out of all the applications I have made in autolisp I still cannot figure out the object model equivalent to the following command:

Code: [Select]
(vl-cmdf "-VIEW" "RESTORE" viewName)
With the viewName being a valid one of course. The reason I am aiming for the object model equivalent is because I want to use ODBX. It's much faster and more efficient. I have attached a lsp file, I hope I have placed all the relevant functions needed for it to operate. So I have drawings with dynamic blocks to represent the viewport view. When I run my automation, I use xrefs on multiple drawings. On these drawings I get the viewport data from the original drawing and use the views in the xref. Then I delete the viewport data blocks.

I am making my way towards complete ODBX automation and this is the only thing stopping me. My code is old and sloppy so sorry about that.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Create Clipped Viewport without MVIEW command
« Reply #2 on: September 18, 2020, 10:45:45 AM »
I have alzheimer's ...
« Last Edit: September 20, 2020, 03:57:26 PM by MP »
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst