Recent Posts

Pages: [1] 2 3 ... 10
1
AutoLISP (Vanilla / Visual) / Access AEC Roof object properties?
« Last post by kenkrupa on July 21, 2019, 05:08:23 PM »
I'm not finding any way to do this programmatically. Anyone?
2
AutoLISP (Vanilla / Visual) / Re: Layout to Model
« Last post by Topographer on July 21, 2019, 11:04:50 AM »
I have this lisp file but export everything in wrong position with wrong scale.I want to keep the viewport scale and the correct coordinate position, like  Viewport Outline

Code - Auto/Visual Lisp: [Select]
  1. (defun c:test ( / BASE LST OLD_DIA)
  2.   (setq old_dia (getvar 'FILEDIA)
  3.         base    (strcat (getvar 'DWGPREFIX) (vl-filename-base (getvar 'DWGNAME)))
  4.   )
  5.   (setvar 'FILEDIA 0)
  6.   (setq lst (layoutlist))
  7.   (foreach l lst
  8.     (command "_.ctab"
  9.              l
  10.              "exportlayout"
  11.              (strcat base "-" l)
  12.     )
  13.   )
  14.   (setvar 'FILEDIA old_dia)
  15.   (princ)
  16. )
  17.  

Any ideas?

Thanks
3
AutoLISP (Vanilla / Visual) / Layout to Model
« Last post by Topographer on July 21, 2019, 10:25:55 AM »
Hi. I am using Lee Mac Viewport Outline lisp http://www.lee-mac.com/vpoutline.html, to insert viewport outline in model space. Is any way to inset all the layout in model space in correct scale and position and not only the outline of the viewport ?

Thanks
4
AutoLISP (Vanilla / Visual) / Re: Automatic dimensioning lines
« Last post by renkor on July 21, 2019, 05:50:29 AM »
Hello,


Could I test your code once?
5
.NET / Re: Hatch not showing up after creation
« Last post by Kralj_klokan on July 21, 2019, 03:30:49 AM »

Show us the code you are using from the button callback/event please.
This is the way i show my tool palette (WPF):

Code - C#: [Select]
  1.             var palette = new ToolPaletteViewModel();
  2.             palette.AddVisual("", new ToolPaletteView() { DataContext = palette });
  3.             palette.Visible = true;
  4.             palette.Dock = DockSides.Right;
  5.  

This is my xaml for the button:
Code - XML: [Select]
  1. <Button Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}, Path=DataContext.ItemSelectedCommand}" CommandParameter="{Binding}" Margin="5"/>

And when the button is pressed the code is:

Code - C#: [Select]
  1.         internal void StartHatchingByPickPoint(string layerName, Autodesk.AutoCAD.Colors.Color color)
  2.         {
  3.             var hatch = new PickPointHatch(layerName, color);
  4.             PickPointHatch.TraceBoundaryAndHatch();
  5.         }
  6.  

If I call the last bit of code i posted anywhere but on the toolpalette it will work. Ridicolous.

Some more info:

If i put the loop to be appended as outermost, the hatch is being displayed but without the islands. If i click on the hatch editor i see that the hatchstyle is set to outer. But toggling from normal to outer does nothing . The hatch stays the same.
If i click on the outer polyline twice and then press Cancel the hatch will display the right way and the islands show. Also, moving the hatch a little will also work. As if autocad recalculates the hatch if i move/edit the associated borders.
6
CAD General / Re: Where does autocad save the different variable settings?
« Last post by dgorsman on July 21, 2019, 01:50:11 AM »
In different places, some in the DWG file, some in the registry, and some are not stored at all.  Look in the documentation,  each system variable will list where (and if) it is stored.
7
.NET / Re: Hatch not showing up after creation
« Last post by kdub on July 20, 2019, 08:57:03 PM »

Show us the code you are using from the button callback/event please.
8
.NET / Re: Hatch not showing up after creation
« Last post by Kralj_klokan on July 20, 2019, 06:30:00 PM »
Hi everyone,

The conclusion is that code posted is working fine. When I type the command in the command prompt its working perfectly. As i wished to call the command from a button on a palette i found out that it has to be something that has to do with the palette.
I even tried calling the same code from a modal dialog or simply immediately when initializing the application and everything worked.

The only explanation must that when calling this kind of code from a palette results in errors and is not reliable.
If anyone tries to do the same thing i did i can only suggest that he tries using a modal dialog while creating his plugin since it seems that it's more reliable.

Thanks everyone for your help.
9
CAD General / Where does autocad save the different variable settings?
« Last post by quaziconscience on July 19, 2019, 06:50:02 PM »
Hey all,

Where does autocad store/save the different variable settings? 
10
AutoLISP (Vanilla / Visual) / Re: Angle of Closed polylines elbows
« Last post by MP on July 19, 2019, 02:10:35 PM »
My pleasure; cheers.
Pages: [1] 2 3 ... 10