How to show a Child Dialog from Joint.page dialog (API)?

How to show a Child Dialog from Joint.page dialog (API)?

Anonymous
Not applicable
908 Views
4 Replies
Message 1 of 5

How to show a Child Dialog from Joint.page dialog (API)?

Anonymous
Not applicable

Hi,

 

I need to show a Child dialog from Joint dialog, but it seems not work. Dialog frame is show out, while context does not show out, it keep running. Does anyone know why? Is there a limit in API?

 

Code are something like:

 

at IRule:

public void GetUserPages(RulePageArray pagesRet, PropertySheetData pPropSheetData)

{

 

RulePage rulePage1 = m_Joint.CreateRulePage();

m_Page1 = new Page1(this);

rulePage1.hWnd = m_Page1.Handle.ToInt64();

pagesRet.Add(rulePage1);

}

 

at Page1:

private void mouse_Click(object sender, EventArgs e)

{

 

  UserForm add = new UserForm();

 

add.Show(this); // method A

 

Autodesk.AutoCAD.ApplicationServices.Application.ShowModalDialog(Autodesk.AutoCAD.ApplicationServices.Application.MainWindow.Handle, add); // method B

 

 Autodesk.AutoCAD.ApplicationServices.Application.ShowModelessDialog(Autodesk.AutoCAD.ApplicationServices.Application.MainWindow.Handle, add); // method C

 

// I tried 3 methods (A, B, & C), none of them works.

}

 

 

Please help if anyone know about it.

 

Regards,

 

Luke

 

0 Likes
Accepted solutions (1)
909 Views
4 Replies
Replies (4)
Message 2 of 5

vlad_pavel
Autodesk
Autodesk

Hi,

 

The joint dialog does not support adding pages with child pages. If you want to open another dialog from the joint, you should close the joint dialog and then use the autocad api to display it

 

Regards,

Vlad

0 Likes
Message 3 of 5

Anonymous
Not applicable

Vlad,

 

I am not adding child pages to joint dialog, I need to open a dialog from there. For example, I like to open a dialog for perferred profile, available plate thickness (per customer), or list of materail (per job)... or even quick help window to explain meaning of input. It can be modal or modaless.

 

I see one of joint "Hanuch Bolted" have a "Edit" button, which open a new dialog when click it. That is exactly what I need. Anyone know how to do it correctly? See attached snap shot.

 

Regards,

 

Luke

0 Likes
Message 4 of 5

vlad_pavel
Autodesk
Autodesk
Accepted solution

Hi,


When you pass "this" to "show" function, you are displaying a dialog as a child window of the joint page. I have created a new windows form with some controls and display it from the joint page.

 

Form1 f = new Form1();
f.Show(this);

 

I used the SampleJoint from the SDK to do this

It worked fine, maybe your UserForm or the joint page has something different

 

 

0 Likes
Message 5 of 5

Anonymous
Not applicable

Vlad,

 

I tried same, but not work. See my code on first post.

 

Maybe it's due my code in dialog form. Same code works if I start is from Advance Steel command, or window, but failed when start from Joint pages.

 

Regards,

 

Luke

0 Likes