Thursday, May 25, 2017

Set Autocad Lsp Lisp options files for plotting pen tables and Temp folders vla-put Set paths to C\users\username

 Set paths to C\users\username (STRCAT "C:\\Users\\" (getvar "loginname") "\\OneDrive\\PATH"))

;START LSP
;;; Lisp to add paths
(vl-load-com)
; This sets a reference to the install path of your product
(setq acadloc
   (vl-registry-read
      (strcat "HKEY_LOCAL_MACHINE\\" (vlax-product-key))
   "ACADLOCATION")
); This sets a reference to the files portion of the acad preferences

(setq *files* (vla-get-files
   (vla-get-preferences (vlax-get-acad-object))
)) 

; Paths to set Options > Files >
;Printer file support path...
(vla-put-PrintSpoolerPath *files* "C:\\Temp\\")
(vla-put-PrinterConfigPath *files* "\\\\Server\\printers")
(vla-put-PrinterDescPath *files* "\\\\Server\\printers")
(vla-put-PrinterStyleSheetPath *files* "\\\\Server\\Pen Settings")

;Automatic Save
(vla-put-AutoSavepath *files* "C:\\Temp\\")

;Template settings
(vla-put-TemplateDwgPath *files* "\\\\Server\\Templates\\")
(vla-put-QnewTemplateFile *files* "\\\\Server\\templates\\Template.dwt")

;Log File
(vla-put-LogFilePath *files* "C:\\Temp\\")

;Plot and Publish log
(vla-put-PlotLogFilePath *files* "C:\\Temp\\")

;Temporary Drawing location
(vla-put-TempFilePath *files* "C:\\Temp\\")

;Temporary External Reference
(vla-put-TempXrefPath *files* "C:\\Temp\\")
 
; end use of *files*
(vlax-release-object *files*)
; exit quietly
(princ "Paths set to Server")
 ;END LSP

MORE

 ; This sets a reference to the install path of your product
; the gets are their for info maybe other use

(vl-load-com)
; make temp directory
;(vl-mkdir "c:\\ACADTEMP")

(setq *files* (vla-get-files (vla-get-preferences (vlax-get-acad-object))))

; savepath
;(vla-get-AutoSavepath *files*)
(vla-put-AutoSavepath *files* "C:\\Temp")

; custom icons
;(vla-get-CustomIconPath *files*))
(vla-put-CustomIconPath *files* "S:\\Autodesk\\ICONS")

; printers config
;(vla-get-PrinterConfigPath *files*)
(vla-put-PrinterConfigPath *files* "S:\\AutoDESK\\Plotting\\Plot Styles 2011")

; printers style sheet
;(vla-get-PrinterStyleSheetPath *files*)
(vla-put-PrinterStyleSheetPath *files* "S:\\AutoDESK\\Plotting\\Plot Styles")

; printer drv's
;(vla-get-PrinterDescPath *files*)
(vla-put-PrinterDescPath *files* "S:\\AutoDESK\\Plotting\\Drv")

; print spooler
;(vla-get-PrintSpoolerPath *files*)
(vla-put-PrintSpoolerPath *files* "C:\\Temp\\")

; template location
;(vla-get-QnewTemplateFile *files*)
(vla-put-QnewTemplateFile *files* "S:\\Autodesk\\c3d Templates\\cxxx.dwt")

;make new support paths exist + new
(setq paths (vla-get-SupportPath *files*))

(setq mypaths
"S:\\autodesk\\supportfiles;
S:\\autodesk\\lisp;
S:\\autodesk\\fonts;
S:\\autodesk\\hfs fonts;"
)

(setq newpath (strcat mypaths paths))
(vla-put-SupportPath *files* newpath)

; Tempdirectory
;(vla-get-TempFilePath *files*))
(vla-put-TempFilePath *files* "C:\\Temp\\")

; template path
;(vla-get-TemplateDwgPath *files*)
(vla-put-TemplateDwgPath *files* "S:\\Autodesk\\c3d Templates")

; xref temp path
;(vla-get-TempXrefPath *files*))
(vla-put-TempXrefPath *files* "C:\\Temp\\")

; end use of *files*
(vlax-release-object *files*)

; exit quietly
(princ "All Done")

Friday, May 19, 2017

Point clouds to mesh MeshLAB








Procedure with Meshlab free program

http://www.meshlab.net/

The “Filter->Sampling->Poisson Disk Sampling

 
Make sure you check the “Base Mesh Subsampling” box.

Filters -> Point Set -> Compute Normals for point set”

The “Filters -> Point Set-> Surface Reconstruction: Poisson”
 
  Detailed explanation

Occasionally you will need to sub-sample your point-cloud data to
make it easier to work with. This does inevitably reduce the resolution of the
data but if proper techniques are used you can maintain a high level of
fidelity in the point cloud data.
*** Especially in noisy scan’s from the Kinect
We will want to
recreate a surface, which through trial and error (at least with objects that contain
  a lot of curves or contours) the Poisson disk method obtains the
best results.

The
“Filter->Sampling->Poisson Disk Sampling”

Make sure you check the “Base Mesh Subsampling” box.



The algotrithim
 it was designed to create circular window over the point cloud and
calculate those points that are statistically “random” according to a
Poisson distribution.



Like previously mentioned the exact parameters used in your
process are TOTALLY APPLICATION DEPENDENT. Meaning that what worked well
with a point cloud of a million points for the interior of a room, may not work
with a million points of a human face.


The image below the point cloud captured from the Microsoft Kinect
(of a human chest – side view) and it has points that are not apart of the
actual object we want to creat a 3D model of. So to avoid have spikes or
deformities in our data we should apply a few methods in eliminating them when
possible. 
False points to be removed from point set data


While there are many different ways to deal with these rouge points we can once again apply the Poisson distribution, which seems to have the best results in the automated
filters offered by MeshLab. 
Much like the
filtering of noise in LiDAR data the Poisson takes the entire area of
interest(the radius of the window size we specify in this case) and looks at
the corresponding distribution of points in 3D space. When points are
determined to be statistically random following the number of iterations you
specify the alogritim will remove that point from the recreation of the
surface. 
Even though the Poisson does an excellent job there are still cases where manually cleaning these points from the data is required. (Meaning select it and delete it)


It is also important to note that since the Poisson is a
stochastic process no two subsamples will be exactly the same even if the exact
same parameters are used. So save your data often!!


We will now have to calculate the normals on the sub-sample
we just created so MeshLab knows which side of the point is facing “out” and
which is “in”.

For the point set:

“Filters -> Point Set -> Compute Normals for point set”

At this point you will need to choose one of the surface
reconstruction algorithms that MeshLab offers.



The “Filters ->
Point Set-> Surface Reconstruction: Poisson”

*** Note: This could get time consuming and at least in my experience crashes
when the data  is huge(“huge” is a scientific word for bigger than normal)
As mentioned before in
the subsampling discussion a few tabs ago you can also use the “Marching Cubes
(APSS)” which has pretty good results on data with few contours.


For you inquisitive folks who need to know more about each
of these processes for surface reconstruction please check out these two
links: 
Marching Cubes or the Poisson


 


 

Thursday, May 11, 2017

AutoCAD version number

The first six bytes of a DWG file identify its version. In a DXF file, the AutoCAD version number is specified in the header section. The DXF system variable is $ACADVER.

AC1032 AutoCAD 2018
AC1027 AutoCAD 2013/2014/2015/2016/2017
AC1024 AutoCAD 2010/2011/2012
AC1021 AutoCAD 2007/2008/2009
AC1018 AutoCAD 2004/2005/2006
AC1015 AutoCAD 2000/2000i/2002
AC1014 Release 14
AC1012 Release 13
AC1009 Release 11/12
AC1006 Release 10
AC1004 Release 9
AC1003 Version 2.60
AC1002 Version 2.50
AC1001 Version 2.22
AC2.22 Version 2.22
AC2.21 Version 2.21
AC2.10 Version 2.10
AC1.50 Version 2.05
AC1.40 Version 1.40
AC1.2 Version 1.2
MC0.0 Version 1.0

Tuesday, May 9, 2017

Flexnet license manager finder

AutoCAD – FlexLM Variable Server & Timeout
1.0 ERRORS
The security system (softlock license manager) is not functioning or is improperly installed.
Flexnet license manager finder – your application was not able to obtain a license because the FlexNet license server manager could nor determine where to fine the licensing data it needs. Please choose one of the following.
License file server
Specify the license file

2.0 IF IN REMOTE OFFICE YOU CAN GET A LICENSE TRY SETTING THIS VARIABLE TO GIVE AUTOCAD A LONGER TIME TO CONNECT.
Start > Right-click My Computer > Properties > Advanced system settings > Environment Variables > New System variable>
Variable Name = FLEXLM_TIMEOUT
Variable Value = 1000000
1 million microseconds, increase by 1 million if no connection.

3.0 FLEX_LM CAN’T CONNECT IN REMOTE OFFICE LICENSE FILE NOT FOUND
AutoCAD license manager is Server Name
Start > Right-click My Computer > Properties > Advanced system settings > Environment Variables > SYSTEM VARIABLE > New >
Variable Name = ADSKFLEX_LICENSE_FILE
Variable Value = 27000@Server Name

Tuesday, May 2, 2017

AutoCAD remove Model from PDF name

Publish a single page. Do not use plot use Publish and only one drawing. Annoying?