AutoCAD .NET :: Set One Palette On Paletteset On Top Through Code?
Apr 11, 2012I have a paletteset which contains multiple palettes. How can I set one of the palette on top through code?
It is something like set current tab in tab control
I have a paletteset which contains multiple palettes. How can I set one of the palette on top through code?
It is something like set current tab in tab control
I would like to do something when my paletteset is closed. I took the C# code from here
[URL]
I modified the code to VB.net
Dim WithEvents ps As Autodesk.AutoCAD.Windows.PaletteSet <Autodesk.AutoCAD.Runtime.CommandMethod("psTest")> _ Public Sub PSTest() If ps Is Nothing Then ps = New Autodesk.AutoCAD.Windows.PaletteSet("psTest")
[Code]...
My code crashed. If I catch exception it is eInvalidInput exception. I don't know what to do as it is a simple code segment I don't know hot to fix it.
How can I catch the event when I change the container inside a palette?
View 3 Replies View RelatedBecause there is no way to tell the difference between minimize ("-") to close ("x") on palette set. I put a button on my user control to write my own code to close the Palette Set.
m_ps is the current PaletteSet, m_uc is my user control which has been loaded into m_ps.
what code I need to write inside my close button click event to unload m_uc , close m_ps and set both m_uc and m_ps to nothing?
I cant find Autodesk.AutoCAD.Windows.PaletteSet as My Program,
im import AutoCAD 2013 x64 Directorys
accoremgd.dll
acdbmgd.dll
as my source.
Program is using c# 4.0
// this is my class source.
using ACAD = Autodesk.AutoCAD.ApplicationServices.Core;
using Autodesk.AutoCAD.Runtime;
I created an an app that uses a paletteset, and displays an usercontrol in it. I want to add a scroll to the paletteset. As when I resize it for editing the dwg file, The paletteset data below cannot be viewed without a scrol bar. get the scroll bar.
Autodesk.AutoCAD.Windows.PaletteSet m_ps = new Autodesk.AutoCAD.Windows.PaletteSet("Object Data");UC uControl = new UC();m_ps.Add("Object Data", uControl ); m_ps.Visible = true;
paletteset properties does have any properties related to scrollbar.
I just spent ages perfecting a series of windows forms dlls (not wpf or anyting, just normal user controls from VS2012). they look, compile and test fine. but when I add them to an autocad PaletteSet they stretch out 57 pixels and move buttons into textboxes and such....
is this normal? my docked control is not 407 wide....
it was 350 the entire design phase! and if it added 57 it would be one thing but it "stretches" half the controls and leaves the rest so they overlap!
I created a paletteset with MinimumSize, it works fine when the paletteset is not docked to anywhere. However the MinimumSize doesn't seem to work at all. I tried to dock it to left, then I can drag the edge to really narrow.
View 1 Replies View RelatedThe PaletteSet changed control size and layout. It's different from the status in VS.What's the reason?
View 7 Replies View RelatedI have got a problem about getting user input. In a function i am first getting a selection from the user by editor.getselection(...)
then i show a palette set with my user control in the same function. everything is fine so far.
but after showing paletteset i try to get a string from the user by editor.getstring(...) in the same function but statement continues as i never request it. when i check the PromptResult status it is equal to cancel.
i mean
Transaction acTrans = null;
Document acDoc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
Database acCurDb = acDoc.Database;
acDocLock = acDoc.LockDocument();
using (acDocLock)
[code].........
i tried to lock the document but it doesnt work either. when i comment out "showpalette(true)" it works correctly. i realized that if my document window s state is not WindowState.Maximized then my code works just fine but if it is WindowState.Maximized it does not work.
Is it possible to add the Properties Palette to a custom made palette set in .NET? And how to do this?
View 3 Replies View RelatedI wan´t to delete a palette from Autocad Tool Palette. How can I do?
View 3 Replies View RelatedFor some reason, the tool palette I usually use is not accessible. I opened a drawing that a co-worker was using and my tool palette now looks like an old version - it doesn't have any of my custom tools in it. How do I get back my tool palette??
View 1 Replies View RelatedI've only ever used gimp sparingly and for simple stuff. I now need to set the palette of a 8-bit png to a specified palette, but I can't find any in gimp or online about how to load a palette. I need the palette to contain colors that may not be in the image if thats possible as these images are sprites of under 40 colors, but I need a full 256 color palette. Also is there any simple way to convert a string of numbers into a gimp palette? If not Ill probably just look at how they are saved and just write a simple script, but I thought i would ask.
View 5 Replies View RelatedOur app crashes with a certain dwg-file from a customer.I located the crash to an entity that contains a dxf-code 440.
The error is of course ours, we should be able to handle unknown dxf-codes.But where does it come from? It seems to represent the alpha-channel.
How can I create an entity that contains that dxf-code?And what does a polyline do with an alpha channel?
I'm doing a project for my paper and it would really save me some trouble if i could loft through vba..... the alternative is too boresome....
View 4 Replies View RelatedHow to use Animation, 3D orbit in VBA code ? Is there any equivalent method ?
View 1 Replies View RelatedI am having trouble finding a reference for how to use field code. I am trying to create a custom fied in MTEXT that will only display the 1st 25 characters of a filename. I can't find any good resources to explain how field code in AutoCAD works on the web.
View 3 Replies View RelatedHow do I insert lisp code into vba?
View 1 Replies View RelatedAny QR code creator to use in IDW.
Explaining: having the internet address and putting it in the creator it creates the image code somewhere in the IDW.
I am new to .Net and trying to do some C# programming. Where can I find some Autocad sample code for download?. Also where can I get the following namespaces?.
Autodesk.AutoCAD.ApplicationServices;
Autodesk.AutoCAD.DatabaseServices;
Autodesk.AutoCAD.EditorInput;
Autodesk.AutoCAD.Runtime;
Autodesk.AutoCAD.Geometry;
Autodesk.AutoCAD.GraphicsInterface
How do I specify the code set to be used on subassemblies when creating an intersection? I want to specify this in a command setting so that the intersection is built correctly without me having to edit feature lines in the corridor properties for th intersection.
View 9 Replies View Relatedhow to show in the message box the assembly name or part name in the model browser without selecting it using vba?
View 7 Replies View RelatedI have this vba code that created in 2009 autocad 32 bit environment. I am fixing it so it will work for the 2013 autocad civil 3D 2013 64 bit environment.
The code work fine in the old vision but keep on crushing in the new one . I fixed the references and also move up the search path to the top, but it showing compile errors or runtime errors like the following.
if you ignore that error and run it agin it will go to the next step and show you another errors. after a few rerun it will give the result.I try fix it with an older vision library of autocad 2009 and 2012 both gives an run time error message.
I want to use some free CAM software to generate G-code for my 3D model (*.sat).
View 1 Replies View RelatedIs it possible to code a custom linetype, so that it only follow certain annotation scales (e.g. 1:100, 1:200 1:500) and so that it just appears as a continuous line below and above these certain scales?
The solution should work even when the drawing is used by others and apply to both modelpsace and paperspace (viewport).
I want to open a dwg file from code in my program. I have a string variable containing the full path and file name. I want to open the dwg file in an instance of Autocad that is already running, I don't want to open Autocad. The program is written in VB 6.0.
View 2 Replies View RelatedMy sections are showing a label for some of my links that are coded as "top". My label style for the "top" link is set to none and some of the labels are still displayed.
The labels show in the sections, but not the assembly. We are running Civil 3D 2012.
I am moving from VBA to VS2010/12 and I am having my first problem
Firstly, I read that I should install AutoCad 2013 DoNet Wizard to be able to compile and debug my code. After install it I managed to "debug" when I set the brakepoint but I couldn't change the code while debugging...
I did a fast search in this forum and I found some similar issues but they where old posts (before C3D2012 and VS2012). So, is it possible now to edit code while debugging as I was able to do in VBA? This will save me a lot of time. Mostly in my case once I'll make a lot of beginner mistakes...
In some post I found that we should install a virtual machine and run in 32bits mode to be able to edit. This is the best solution?
The company I work for uses Illinois DOT linework Codes.They had been using Microstation. But the office Im in uses Civil 13. Any linework code set that I need to process field to finish?
View 1 Replies View RelatedI included a VB code in our drawing template, but then I get the "Warning: You have a non-empty VBA project.." message. If I copy the code into iLogic, I just get an error message. Why it runs fine as a separate macro, but doesn´t work in Inventor, or how I can include the code into the template? URL....
View 2 Replies View Related