Page 1 of 1
AutoCAD - Parametric Parameters
Posted: 24 Mar 2020, 20:33
by keith.lewis
Is it possible to access the parametric parameters within CAD.Net? I have drawing templates that use these parameters to update the drawing. Is there a way to update these parameter expressions via CAD.Net?
Re: AutoCAD - Parametric Parameters
Posted: 24 Mar 2020, 21:25
by support
Hello Keith,
It is possible to access dimensional constraints through a CADDimension.TextOverride property which stores a string containing a name of the dimensional constraint and its value. For example: "d1=1885.8853". CADDimension objects which define the constraints are normally located on the layer *ADSK_CONSTRAINTS.
Mikhail
Re: AutoCAD - Parametric Parameters
Posted: 24 Mar 2020, 21:52
by keith.lewis
Thanks for your response. I can see the layer and I was able to quickly output all of the CADDimensions within that layer but I am not getting the names. For instance, we have parameters named WIDTH, HEIGHT, and DEPTH. These parameters are assigned a hard integer value and almost all other constraints work from these values. When I output the dimensions that are on that *ADSK layer, I see mostly the values that are the result of the calculation. I cannot see the actual Name nor the Expression. I inserted a stop point and placed a watch so that I can see the CADDimension properties but I didnt see anywhere that specified the parameter Name nor the Expression. I thought maybe it would be inside the EntName property but there is nothing in there.
Some of the TextOverrides do show the expression now that I look at it again. But some calculate the expression and just show the value.
Re: AutoCAD - Parametric Parameters
Posted: 24 Mar 2020, 22:18
by support
keith.lewis wrote: ↑24 Mar 2020, 21:52
Some of the TextOverrides do show the expression now that I look at it again. But some calculate the expression and just show the value.
In AutoCAD parameters may contain an expression or just a value:
The TextOverride property stores the string "Name=Expression" (e.g. "dia1=DIA").
Mikhail
Re: AutoCAD - Parametric Parameters
Posted: 24 Mar 2020, 22:40
by keith.lewis
I wish that were the case. Not in my sample though. See below where I have a screenshot of my AutoCAD 2019 parameters list and the quick console app with output where it doesnt show the Name within the TextOverride. Am I missing something?
AutoCAD 2019 Params Window:
The attachment AutoCAD2019_Params.png is no longer available
My Quick Console App with Output:

- AutoCAD2019_Params.png (4.59 KiB) Viewed 9515 times
Thanks.
Re: AutoCAD - Parametric Parameters
Posted: 24 Mar 2020, 22:56
by keith.lewis
Even if it is not an expression, I just need to be able to identify the CABWIDTH, CABDEPTH, etc parameters and change their values. By changing their values it changes a bunch of things within the drawings making it a bit easier. Im just looking for a way to identify those parameters with a specific name and change their value.
Re: AutoCAD - Parametric Parameters
Posted: 24 Mar 2020, 23:23
by support
keith.lewis wrote: ↑24 Mar 2020, 22:40
I wish that were the case. Not in my sample though. See below where I have a screenshot of my AutoCAD 2019 parameters list and the quick console app with output where it doesnt show the Name within the TextOverride. Am I missing something?
I have used the attached AutoCAD 2010 DXF file for testing. Could you please attach your drawing file for comparison?
Mikhail
Re: AutoCAD - Parametric Parameters
Posted: 25 Mar 2020, 14:28
by keith.lewis
I am using a dwg file. Can this thread be made private or can I email you the file?
Re: AutoCAD - Parametric Parameters
Posted: 25 Mar 2020, 16:10
by support
keith.lewis wrote: ↑25 Mar 2020, 14:28
I am using a dwg file. Can this thread be made private or can I email you the file?
You can e-mail the file to
support@cadsofttools.com.
Mikhail
Re: AutoCAD - Parametric Parameters
Posted: 25 Mar 2020, 16:15
by keith.lewis
Email sent. Thanks.
Re: AutoCAD - Parametric Parameters
Posted: 25 Mar 2020, 21:30
by support
Hello Keith,
Thank you for the file.
For some reason CAD .NET cannot read all the dimensional constraints which use the user parameters (e.g. CABWIDTH, CABDEPTH, HEIGHT) in the expression. For example, "d91=(HEIGHT-(38.75))/2" can be read, while "d44=(CABWIDTH-4)/4" cannot be.
Mikhail