AutoCAD - Parametric Parameters
Moderators: SDS, support, admin
-
- Posts: 6
- Joined: 24 Mar 2020, 20:27
AutoCAD - Parametric Parameters
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
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
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
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
-
- Posts: 6
- Joined: 24 Mar 2020, 20:27
Re: AutoCAD - Parametric Parameters
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.
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
In AutoCAD parameters may contain an expression or just a value:keith.lewis wrote: ↑24 Mar 2020, 21:52Some of the TextOverrides do show the expression now that I look at it again. But some calculate the expression and just show the value.

The TextOverride property stores the string "Name=Expression" (e.g. "dia1=DIA").
Mikhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
-
- Posts: 6
- Joined: 24 Mar 2020, 20:27
Re: AutoCAD - Parametric Parameters
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:
My Quick Console App with Output:
Thanks.
AutoCAD 2019 Params Window:
My Quick Console App with Output:
Thanks.
- Attachments
-
- TestApp_Output.png (20.69 KiB) Viewed 9505 times
-
- Posts: 6
- Joined: 24 Mar 2020, 20:27
Re: AutoCAD - Parametric Parameters
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
I have used the attached AutoCAD 2010 DXF file for testing. Could you please attach your drawing file for comparison?keith.lewis wrote: ↑24 Mar 2020, 22:40I 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?
Mikhail
- Attachments
-
- acad2010_parametric_drawing.zip
- Parametric DXF 2010 drawing with dimensional constraints.
- (11.34 KiB) Downloaded 547 times
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
-
- Posts: 6
- Joined: 24 Mar 2020, 20:27
Re: AutoCAD - Parametric Parameters
I am using a dwg file. Can this thread be made private or can I email you the file?
Re: AutoCAD - Parametric Parameters
You can e-mail the file to support@cadsofttools.com.keith.lewis wrote: ↑25 Mar 2020, 14:28I am using a dwg file. Can this thread be made private or can I email you the file?
Mikhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
-
- Posts: 6
- Joined: 24 Mar 2020, 20:27
Re: AutoCAD - Parametric Parameters
Email sent. Thanks.
Re: AutoCAD - Parametric Parameters
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
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
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support