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

VB.net-Question about the toolbar position

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
Anonymous
1592 Views, 6 Replies

VB.net-Question about the toolbar position

 

I have mede a toolbar myself,after Ioaded it, I put it at a right place.But next time I load it ,it still appear at the default place.

How to write the code to let it memory the position I put it last time.

Thinkyou! 

 

 

question.jpg

6 REPLIES 6
Message 2 of 7
Alfred.NESWADBA
in reply to: Anonymous

Hi,

 

after you repositioned the toolbar do a _WORKSPACE ==> save, the next time you start AutoCAD with this workspace (or you switch from any workspace to this one) the toolbar will be on it's saved position.

 

HTH, - alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 3 of 7
Anonymous
in reply to: Alfred.NESWADBA

I have sent _workspace

命令: workspace
输入工作空间选项 [置为当前(C)/另存为(SA)/编辑(E)/重命名(R)/删除(D)/设置(SE)/?] <置为当前>: *取消*

then i chose SA and save the workspace as a new name and set it active,but next time it doesn't work, the toolbar still appears at default position

 

this is my start.lsp file:(I have add it in startgroup)

 

(command "netload" "D:/program files/My toolbarfor cad2010/my toolbar")
(command "tool")

Message 4 of 7
Alfred.NESWADBA
in reply to: Anonymous

Hi,

 

sorry, did not interpret your message as "creating toobars from dotNET in runtime".

There was a similiar discussion >>>here<<<, look at it and let me know, if you have different reasons for creating it runtime (as maybe the toolbar often changes in runtime) or if it's also the better option not to create it in runtime.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 5 of 7
Anonymous
in reply to: Alfred.NESWADBA

Hi:

Yes ,the toolbar is ofen be moved when we are working,i just want it(the toolbar) stay at the place where I moved to last time  ,and i hope the next time I lunch CAD,it will still stay  there.How to do it ?

if i  exploring CUI files how to do it?

Thank you!

Message 6 of 7
Alfred.NESWADBA
in reply to: Anonymous

Hi,

 

>> i just want it(the toolbar) stay at the place where I moved to last time

then I would save the workspace PLUS lock the UI (look for sysvar LOCKUI >>>here<<<).

 

For the situation that the toolbar has to be created and placed in runtime I have no global answer that describes how to handle that, sorry!

The reason is easy and discussed in the other thread I linked in my last post), you will always have the problem for: where do you have to place your toolbar when the workspace has changed before? There may be no toolbar in the line where you want to dock it to, there may be another toolbar already present at the position where you thought your toolbar should be placed to, there maybe a lot of more reasons that can be a surprise in runtime.

 

Sorry, - alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 7 of 7
Anonymous
in reply to: Anonymous

To me, the problem here seems to be the fact that you are recreating the toolbar every time. You may save the position of the current toolbar, but when you recreate the toolbar, you effectively have a new toolbar, not the same one you saved. Thus, it appears in the default position.

 

If the toolbar needs to be updated everytime you start AutoCAD, then perhaps try modifying the toolbar instead of recreating it.

 

 

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost