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

Methods of ucs(wcs)

5 REPLIES 5
Reply
Message 1 of 6
luo.jw
556 Views, 5 Replies

Methods of ucs(wcs)

When i try to set the current ucs by ucs name within the ucstablerecord, I found that the founction "acedSetCurrentUCS" doesn`t work. I wish to get more detail about ucs. How does the ucs work in objectarx,

5 REPLIES 5
Message 2 of 6
Alexander.Rivilis
in reply to: luo.jw

Try this code: https://forums.autodesk.com/t5/objectarx/how-to-set-current-ucs/m-p/2513619#M26377

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

Message 3 of 6
luo.jw
in reply to: luo.jw

Thank a lot.  And i`m a newer in objectarx learining. The code in that page that you provide confuse me. Maybe i have some misunderstandings about wcs and ucs. Could you give some recommends to help me getting deeper to understand the relationship between wcs and ucs.  Thank u very much.

Message 4 of 6
Alexander.Rivilis
in reply to: luo.jw


@luo.jw wrote:

Thank a lot.  And i`m a newer in objectarx learining. The code in that page that you provide confuse me. Maybe i have some misunderstandings about wcs and ucs. Could you give some recommends to help me getting deeper to understand the relationship between wcs and ucs.  Thank u very much.


What problem are you trying to solve?

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

Message 5 of 6
luo.jw
in reply to: Alexander.Rivilis

Thank you very muck, I just want to know how to implement the founction: druing the process of drawing, i just need type a shortcut to set the current ucs instead of clicking the viewcube and selecting the named ucs or wcs to set the default ucs or wcs.

Message 6 of 6
daniel_cadext
in reply to: luo.jw

You need to get the view matrix and feed it to acedSetCurrentUCS

There’s a thread here https://forums.autodesk.com/t5/objectarx/need-to-mimic-ucs-v-command/m-p/5197755

 

 

This probably doesn’t do what you want, but so you have an idea

 

    //#include "gs.h"
    //#pragma comment(lib, "AcDrawBridge.lib")
    static void ArxBrxTest_doit()
    {
        resbuf cvport;
        acedGetVar(_T("CVPORT"), &cvport);
        AcGsKernelDescriptor desc;
        desc.addRequirement(AcGsKernelDescriptor::k3DDrawing);
        const AcGsView* pView = acgsObtainAcGsView(cvport.resval.rint, desc);
        acedSetCurrentUCS(pView->viewingMatrix());
    }

 

edit, might be better to send command "UCS" "V"

 

Python for AutoCAD, Python wrappers for ARX https://github.com/CEXT-Dan/PyRx

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

Post to forums  

Forma Design Contest


Autodesk Design & Make Report