How to get AutoCAD object data with JavaScript API???

How to get AutoCAD object data with JavaScript API???

ryanfrhat123
Observer Observer
386 Views
1 Reply
Message 1 of 2

How to get AutoCAD object data with JavaScript API???

ryanfrhat123
Observer
Observer

Hi,

I am right now struggling with the new JavaScript API because of the poor documentation, I learned how to use the API to get points from the user and use the command line of AutoCAD to draw something, but I need also to know:

1- how to use the object id that I get from the user to do something useful.

2- read the output of the command line after the command run, (like LIST command to get the area of an object).

 

I don't even know if this things is supported in JavaScript API or not, please help me.

*I am using the AutoCAD desktop app.

*it is even better to give example of the usage or the instructions on how to use it,

thanks.

0 Likes
387 Views
1 Reply
Reply (1)
Message 2 of 2

Sea-Haven
Mentor
Mentor

(like LIST command to get the area of an object). Correct objects you can get the property Area, similar for length.

 

Copy this to Acad and select an object (entget ( car (entsel "\nPick something "))) you will see some of the properties exposed. No idea with Java, but you should google.

 

Found this.

SeaHaven_1-1665541475662.png

 

 

0 Likes