AutoCAD Architecture Forum
Welcome to Autodesk’s AutoCAD Architecture Forums. Share your knowledge, ask questions, and explore popular AutoCAD Architecture topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Objekt Koordinaten VBA

2 REPLIES 2
Reply
Message 1 of 3
f%C3%BCsiker
599 Views, 2 Replies

Objekt Koordinaten VBA

Guten Tag liebe AutoCAD-Gemeinde,

ich möchte wissen, ob AutoCAD-Objekte wie AcadText, AcadLine (x,y)-Koordinaten
haben bzw. ob man die Koordinaten mit AcadText.Coordinates

Genauer

Dim text As AcadText
Set text = ModelSpace.Item(x)
text.Coordinates

ansprechen kann ?


Wenn ich nämlich bei mir in VBA so ein Objekt anlege und darauf
mit Punkt (also z.B. text.TextString) zugreife, taucht nirgends was mit Coordinates auf.

Was ich weiß, ist dass bei mir vielleicht ein Modul im VBA-Editor nicht geladen sein könnte.


Bitte um einen Tip!
2 REPLIES 2
Message 2 of 3
f%C3%BCsiker
in reply to: f%C3%BCsiker

Hi,

i want to know, if objects in AutoCAD that can be controlled through
VBA, for example the Line-Object AcDbLine, have coordinates which can
be extracted through VBA.

Since im trying to exract them now, the object AcDbLine doesnt have the
method .Coordinates in my VBA development environment.

I've programmed a bit in VBA for Excel, Access, Word, PowerPoint and i
know that sometimes some needed libs are not loaded yet.
So one have to load them oneself.

But I dont know what libs are responsible for Coordinates (complex algebraic functions)
in VBA for AutoCAD architecture.

So if someone knows, pls tell what to do or what libs i need.


Thank you very much.
Message 3 of 3
f%C3%BCsiker
in reply to: f%C3%BCsiker

Yet I've found an unsatisfying solution to extract the
coordinates of any AutoCAD-Object

It goes like this

Dim text As AcadText
Dim tmp As AcadEntity
Dim coord As Variant

Set tmp = ModelSpace.Item(counter)

IF .... Then

Set text = tmp
coord = text.InsertionPoint
MsgBox Prompt:="x-coord: " & coord(0)
MsgBox Prompt:="y-coord: " & coord(1)

End IF


But it's not what I'm searching for. I'm searching for something like text.Coordinates

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

Post to forums  

Autodesk Design & Make Report

”Boost