Finding Infopostion and inforelpostion of object through ecmascript

Use this forum to ask questions about how to do things in QCAD.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
kinoy
Junior Member
Posts: 11
Joined: Mon Mar 20, 2017 11:21 am

Finding Infopostion and inforelpostion of object through ecmascript

Post by kinoy » Tue Apr 11, 2017 7:24 am

Is there any way through ecmascript we could find the coordinates or the infoposition and infopositionrel of the loaded object.I would need to log the infopostion of object in the imported dgn file.If I could get the methods signature with respect to infopostion and infopositionrel I could get the values and then log it in the log file.

User avatar
andrew
Site Admin
Posts: 9061
Joined: Fri Mar 30, 2007 6:07 am

Re: Finding Infopostion and inforelpostion of object through ecmascript

Post by andrew » Thu Apr 13, 2017 8:48 am

Unfortunately, I do not understand this question. Perhaps, you can rephrase it or give us an example in the format:
1. User opens a DXF/DWG file
2. User starts tool "..."
3. ...
4. ...

Thanks.

kinoy
Junior Member
Posts: 11
Joined: Mon Mar 20, 2017 11:21 am

Re: Finding Infopostion and inforelpostion of object through ecmascript

Post by kinoy » Thu Apr 13, 2017 9:51 am

Thank you for the reply. I am not using the gui tool.I am using qcad through command line execution. I am creating an ecma script which is reading a dgn file and is exporting it to svg file.When doing export functionality I am logging certain functionalities . Along with them I would also want to log InfoPosition and InforelPostion of the object in dgn file. is there any way to do it.Hope you understood my question.

User avatar
andrew
Site Admin
Posts: 9061
Joined: Fri Mar 30, 2007 6:07 am

Re: Finding Infopostion and inforelpostion of object through ecmascript

Post by andrew » Thu Apr 13, 2017 2:30 pm

Can you provide an example?

Let's say if your file contains a line from coordinate 50,30 to 100,120, what would "InfoPosition" be? And what would "InfoRelPostion" be?

InfoPosition and InfoPositionRel are script implementations of interactive tools in QCAD, so this question does not make any sense to me at the moment :?

kinoy
Junior Member
Posts: 11
Joined: Mon Mar 20, 2017 11:21 am

Re: Finding Infopostion and inforelpostion of object through ecmascript

Post by kinoy » Fri Apr 14, 2017 7:52 am

Thanks for reply. I have attached the Image of rectangle from the gui tool. The rectangle shows the intersection point (5,1) as the infoposition when we select the line or the point. I have a requirement from the client that with out using the gui I should somehow get the insersection point of the Infoposition and Inforelposition through the script code and log it which they could use for some other purpose. I would want to know if it is possible.
Attachments
infoposition.jpg
infoposition.jpg (143.6 KiB) Viewed 4921 times

User avatar
andrew
Site Admin
Posts: 9061
Joined: Fri Mar 30, 2007 6:07 am

Re: Finding Infopostion and inforelpostion of object through ecmascript

Post by andrew » Thu Apr 20, 2017 2:39 pm

kinoy wrote:I would want to know if it is possible.
I'm sure it is. However, there is still input data missing to solve your problem. What is your input? The drawing file plus something, but what is that?

You can for example get the intersection point between two given lines or the intersection closest to a given coordinate or get a list of all intersections, etc.

Post Reply

Return to “QCAD 'How Do I' Questions”