how do i save my parameters to defaults ?
each time i create a sectioonplane i have to change hatch type , scale , and other things .
Solved! Go to Solution.
Depending on the TYPE of variable
(defun c:test () (setq Value (cond ((getint (strcat "\nChoose a Number <" (itoa (setq Value (cond ( Value ) ( 1 )))) ">: " ) ) ) (Value) ) ) )
Try it
i could try a simple lisp routine and add it to acaddoc .
the problem is i dont know what variables control sectionobject parameters ( ie hatch pattern , color , scale , hidden lines etc )
also , i take from your replies there is no way to do this through the interface , options , cui or else
To globally remember settings (meaning applies to all drawing files), look into
VL-REGISTRY-READ, VL-REGISTRY-WRITE, VL-REGISTRY-DELETE.
You will have to initialize these values inside your ACADdoc.lsp (or similar).
Create your own section in the registry (meaning do not add to an existing tree),
and make sure to verify the entries exist in the registry before fetching the values.
HKCU\Software\My_AutoCAD_Settings is a start.
Better yet, do as others above suggest - set values inside ACADdoc.lsp.
Avoid the registry to store data whenever possible...
For single instance to remember values (meaning apply to this drawing file only), look into
VLAX-LDATA-GET, VLAX-LDATA-PUT, VLAX-LDATA-DELETE.
These are called Dictionary items. Suggest keeping the entries to a minimum by using LISTs
and accessing the values using NTH...
???
Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.
thanks for your input . my question is still unanswered :
what variables ( if they exist ) control :
section object intersection fill hatch pattern
section object intersection fill hatch color
section object background lines display
section object background lines hidden display
section object forefront lines display
section object forefront lines hidden display
section object tangent lines display
then of course , if those settings can be found in the user interface , id also be interested to know .
thanks
Hi,
do you mean the standart hatch settings, stored in ACAD system variables HPNAME, HPSCALE and HPCOLOR ?
Take a look to all system variables, maybe you can find your request.
Which ACAD command do you use?
kind regards,
Franz
please read again my previous post .
section object settings ar not controlled by hpname hpscale or hpcolor otherwise it would be a simple matter
Save a simple drawing in DXF format and search for actual sectionobject values. So you can see where it was stored (variable area, tables, dictionaries, ...)
Tried your suggestion and opened a dxf file with a sectionobject in it using notepad . there are a couple of interesting headers ( "sectionobject" or "section_settings") but i didnt see anything obvious related to hatch pattern and scale
even " apply changes to all section objects " is broken - nobody seems to notice - starting to wander, am i the only one to use this 😕
The easiest way to store sectionsettings is to put the sectionobject in a toolpalette. From there you can drop it into drawing and the settings are restored.
If you familiar with lisp there is another way:
1. grab the sectionobject
2. get the settings for the 2d-section
(setq a (vlax-ename->vla-object (car (entsel))))
(setq b (vla-GetSectionTypeSettings (vla-get-settings a) acSectionType2dSection))
(vlax-dump-object b)
With (vlax-dump-object b) you can see all the properties you can manipulate.
With (vla-put-IntersectionFillHatchPatternName b "Ansi31") for instance you can set the hatch to "Ansi31".