.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to get the model space object id by select in paper space?

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
swaywood
2480 Views, 7 Replies

how to get the model space object id by select in paper space?

hi all:

how to get the model space object id by select in paper space without enter the viewport?

anyone done this before?

best regards

swaywood

7 REPLIES 7
Message 2 of 8
Alfred.NESWADBA
in reply to: swaywood

Hi,

 

>> how to get the model space object id by select in paper space without enter the viewport?

I'm not sure to understand the question, because there is only one modelspace in the drawing, independent from any "select in paperspace without ..."

 

>> how to get the model space object id

Look to the samples in the doc's from Autodesk, there you see how to get access to modelspace quite often: >>>click<<<

 

' Open the Block table record Model space for write
Dim acBlkTblRec As BlockTableRecord
acBlkTblRec = acTrans.GetObject(acBlkTbl(BlockTableRecord.ModelSpace), OpenMode.ForWrite)


- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 3 of 8
swaywood
in reply to: Alfred.NESWADBA

Hi,alfred:

Thanks for your reply.

my question is:

i want to get the objectid which the owner is model space by select in paperspace without enter the floating viewport.

normally we can not select anything in modelspace without enter the floating viewport, but i want to get the line whitch exactly through the mouse point i click in paper space.

i use the getentity method, i just want to get the line or lineid, i am not really want to let the line 'selected', so it is not necessary to enter the floating viewport.

 

best regards

swaywood

Message 4 of 8
norman.yuan
in reply to: swaywood

By "model space object id", if you mean id of objects that are in modelspace, I guess what you want is to select objects that can be seen from a paperspace viewport. If so, please see this:

 

http://drive-cad-with-code.blogspot.ca/2014/03/selecting-entities-in-modelspace.html

 

 

 

 

 

Message 5 of 8
swaywood
in reply to: norman.yuan

hi, yuan:

i can not open the link you tell me.

could you post it here?

many thanks.

Message 6 of 8
norman.yuan
in reply to: swaywood

Well, I have no problem to click the link and get to the article. But I place the link here again:

 

http://drive-cad-with-code.blogspot.ca/2014/03/selecting-entities-in-modelspace.html

 

You can also click "Drive AutoCAD with Code" at the bottom of my reply.

 

Message 7 of 8
swaywood
in reply to: norman.yuan

hi,yuan:

i am sorry, i can not open the web site yet.

could you send the article by email?

my email address is : 54408802@qq.com

thanks a lot.

best wishes.

swaywood

Message 8 of 8
swaywood
in reply to: norman.yuan

HI,yuan:

I recieved your PDF, thank you very much, you are really a kind man.

but,could you kindly send me the code only? I can not copy the code, it changed to messy code when i try to paste it.

i know this is too much to ask, but, i really need this code, thank again.

my email is:54408802@qq.com

best wishes

swaywood

 

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost