re: VBA equivalent to (getent)? (mike98)

re: VBA equivalent to (getent)? (mike98)

Anonymous
Not applicable
237 Views
5 Replies
Message 1 of 6

re: VBA equivalent to (getent)? (mike98)

Anonymous
Not applicable
Here is what I want Michael,

I have selected a blockreference with a specific name using a filtered selectionset (acSelectionSetAll, filter on the blockname). Now I need to know if this reference is inserted in modelspace or paperspace and if in paperspace in what layout. I haven't found an answer in VBA yet but I'm open to any sugestions!

Jan Appelman
LENGKEEK architecten en ingenieurs bv
the Netherlands

from Mike98

I hate Lisp. But I've haven't found anything VBA won't do, yet. What exactly do you want to do with that information. VBA provides other means for object manipulation. Perhaps if yu say exactly what you want to do to a certain object, we can tell you how to do it in VBA. -Michael
0 Likes
238 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable
Hi Mike98 (I hope you are more stable then the
other 98),

 

Here we start:

 

    ModelSpaceID =
ThisDrawing.ModelSpace.ObjectID;
    PaperSpaceID =
ThisDrawing.PaperSpace.ObjectID;
    SelectedOwnerID =
SelectedEntity.OwnerID;

 

To be completed...

 

Luc Morrissette,

Flairbase inc.

 




style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Here
is what I want Michael,

I have selected a blockreference with a specific name using a filtered
selectionset (acSelectionSetAll, filter on the blockname). Now I need to know
if this reference is inserted in modelspace or paperspace and if in paperspace
in what layout. I haven't found an answer in VBA yet but I'm open to any
sugestions!

Jan Appelman
LENGKEEK architecten en ingenieurs bv
the Netherlands

from Mike98

I hate Lisp. But I've haven't found anything VBA won't do, yet. What
exactly do you want to do with that information. VBA provides other means for
object manipulation. Perhaps if yu say exactly what you want to do to a
certain object, we can tell you how to do it in VBA.
-Michael

0 Likes
Message 3 of 6

Anonymous
Not applicable
Sorry, The previous reply was for Jan.

 

Luc Morrissette,

Flairbase inc.
0 Likes
Message 4 of 6

Anonymous
Not applicable
Luc,

 

this seems to work BUT
face="Swis721 BT" size=2> :

I can get the ID of the selected object,
works fine

If I loop through the members of
ThisDrawing.Layouts and ask for their ID seperatly I get different ID'd for the
modelspaceobject and paperspaceobjects. Somehow they are not the same as with
ThisDrawing.ModelSpace.ObjectID or ThisDrawing.PaperSpace.ObjectID.

 

Any clue?

 

Jan Appelman

LENGKEEK architecten en ingenieurs
bv

the Netherlands


style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">

Hi Mike98 (I hope you are more stable then the
other 98),

 

Here we start:

 

    ModelSpaceID =
ThisDrawing.ModelSpace.ObjectID;
    PaperSpaceID =
ThisDrawing.PaperSpace.ObjectID;
    SelectedOwnerID =
SelectedEntity.OwnerID;

 

To be completed...

 

Luc Morrissette,

Flairbase inc.

 




style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
Here
is what I want Michael,

I have selected a blockreference with a specific name using a filtered
selectionset (acSelectionSetAll, filter on the blockname). Now I need to
know if this reference is inserted in modelspace or paperspace and if in
paperspace in what layout. I haven't found an answer in VBA yet but I'm open
to any sugestions!

Jan Appelman
LENGKEEK architecten en ingenieurs bv
the
Netherlands

from Mike98

I hate Lisp. But I've haven't found anything VBA won't do, yet. What
exactly do you want to do with that information. VBA provides other means
for object manipulation. Perhaps if yu say exactly what you want to do to a
certain object, we can tell you how to do it in VBA.
-Michael

0 Likes
Message 5 of 6

Anonymous
Not applicable

Luc,

 

this seems to work BUT
face="Swis721 BT" size=2> :

I can get the ID of the selected object,
works fine

If I loop through the members of
ThisDrawing.Layouts and ask for their ID seperatly I get different ID'd for the
modelspaceobject and paperspaceobjects. Somehow they are not the same as with
ThisDrawing.ModelSpace.ObjectID or ThisDrawing.PaperSpace.ObjectID.

 

Any clue?

 

Jan Appelman

LENGKEEK architecten en ingenieurs
bv

the Netherlands


style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">

Hi Mike98 (I hope you are more stable then the
other 98),

 

Here we start:

 

    ModelSpaceID =
ThisDrawing.ModelSpace.ObjectID;
    PaperSpaceID =
ThisDrawing.PaperSpace.ObjectID;
    SelectedOwnerID =
SelectedEntity.OwnerID;

 

To be completed...

 

Luc Morrissette,

Flairbase inc.

 




style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
Here
is what I want Michael,

I have selected a blockreference with a specific name using a filtered
selectionset (acSelectionSetAll, filter on the blockname). Now I need to
know if this reference is inserted in modelspace or paperspace and if in
paperspace in what layout. I haven't found an answer in VBA yet but I'm open
to any sugestions!

Jan Appelman
LENGKEEK architecten en ingenieurs bv
the
Netherlands

from Mike98

I hate Lisp. But I've haven't found anything VBA won't do, yet. What
exactly do you want to do with that information. VBA provides other means
for object manipulation. Perhaps if yu say exactly what you want to do to a
certain object, we can tell you how to do it in VBA.
-Michael

0 Likes
Message 6 of 6

Anonymous
Not applicable
ThisDrawing.ObjectIdToObject(ent.OwnerId).Layout.Name

P.S.
The HTML is an absolute horror.

--
http://www.acadx.com
"You keep using that word. I do not think it means what you think it
means."

"Jan Appelman" wrote in message
news:F1744722ECC7AF05123EAE98DDEE3BF2@in.WebX.SaUCah8kaAW...
> Luc,
>
> this seems to work BUT : I can get the ID of the selected
> object, works fine If I loop through the members of
> ThisDrawing.Layouts and ask for their ID seperatly I get
> different ID'd for the modelspaceobject and paperspaceobjects.
> Somehow they are not the same as with ThisDrawing.ModelSpace.
> ObjectID or ThisDrawing.PaperSpace.ObjectID.
>
> Any clue?
>
> Jan Appelman
> LENGKEEK architecten en ingenieurs bv
> the Netherlands
0 Likes