VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how can i get layout name based on the viewport

5 REPLIES 5
Reply
Message 1 of 6
Anonymous
340 Views, 5 Replies

how can i get layout name based on the viewport

Hai can any one say how to get the layout name based on the viewport
5 REPLIES 5
Message 2 of 6
Bryco
in reply to: Anonymous

The viewport belongs to a layout.block
Dim PV As AcadPViewport
Dim B As AcadBlock
Set B = ThisDrawing.ObjectIdToObject(PV.OwnerID)
Debug.Print B.Layout.Name
Message 3 of 6
Anonymous
in reply to: Anonymous

Hai i need to get layout name with help of viewport but not with the help of block can u plz help me
Message 4 of 6
Anonymous
in reply to: Anonymous

wrote in message news:5850591@discussion.autodesk.com...
Hai i need to get layout name with help of viewport but not with the help of
block can u plz help me

Bryco answered your question. If you don't understand it, study it till you
do.
Look up .Layout, ObjectIdToObject, etc in help

you could even "try" it.
:-)
hth
mark
Message 5 of 6
Basraj
in reply to: Anonymous

Hi,

Have you got answer to your question ? I'm searching help for the similar thing.
Could you help me ?

I need to know boundingbox of all viewports in paperspace, alternatively I need to insert a object which should go back of these objects.
Couldl you please reply me ?

Thanks very much
Basu
Message 6 of 6
Ramyahari
in reply to: Anonymous

Hai this is the answer for that question

Dim blkRef as acadblockreference
ThisDrawing.ObjectIdToObject(blkRef.OwnerID).Layout.Name

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost