Hi there,
I'm using QCAD to develop a schematic capture application. The user of this application will be able to select different circuit elements from the Dynamic Part Library and connect it with lines in order to create a circuit. The DXF file will then be parsed to create a netlist file - nodes and circuit elements.
Each circuit element needs different values - part name, capacitance, etc. These values need to be changed dynamically. Is it possible to store user defined values for each element/part in the DXF file - or some other place for that matter. I've read quite a lot of the DXF2000 documentation, but can't seem to find a way of doing that.
Ideally, the user only need to double click on the part to edit its values.
Regards,
Stefan
Storing user defined variables to dynamic parts
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
-
- Newbie Member
- Posts: 5
- Joined: Sun Aug 09, 2015 3:34 pm
- hungerburg
- Premier Member
- Posts: 160
- Joined: Fri May 28, 2010 7:35 pm
Re: Storing user defined variables to dynamic parts
I suppose, that you paste blocks into your drawing; Blocks can, like lines etc. have DXF x-data properties; QCAD has its very own key-value schema that is conveniently scriptable. Its up to you though, to create a user interface that is more specific to your application than the general property editors "custom properties"; eg. that provides a dialogue with drop-down menus for keys and values etc…
- Attachments
-
- A block with custom properties
- X-Data-Properties.png (18.3 KiB) Viewed 9629 times
-
- Newbie Member
- Posts: 5
- Joined: Sun Aug 09, 2015 3:34 pm
Re: Storing user defined variables to dynamic parts
Hi there,
Thanks a lot for the reply. Will this be possible in the community version of Qcad? Can you please point me to QCAD's key-value schema? I would like to take a look into it.
And yes, I do use blocks. Let's say I use the same block multiple times in the same drawing - is it possible to give each block different values? While playing with the functionality of QCAD I realised that if I edit a specific block, all the blocks change - not just one.
Regards,
Stefan
Thanks a lot for the reply. Will this be possible in the community version of Qcad? Can you please point me to QCAD's key-value schema? I would like to take a look into it.
And yes, I do use blocks. Let's say I use the same block multiple times in the same drawing - is it possible to give each block different values? While playing with the functionality of QCAD I realised that if I edit a specific block, all the blocks change - not just one.
Regards,
Stefan
Re: Storing user defined variables to dynamic parts
No, supporting custom properties per entity is currently not planned for the QCAD Community Edition. dxflib would need a major update for this. Having said that, maybe someone from the QCAD Community will pick this up at one point...stefanjacobs wrote:Will this be possible in the community version of Qcad?
Not sure what you mean by "key-value schema". QCAD itself does not use custom properties.Can you please point me to QCAD's key-value schema?
The term 'block' can refer to a block definition or a block reference. A block with a given name (e.g. "MyBlock") is defined in its block definition. Once defined, this block can then be inserted into the drawing multiple times, creating multiple block references. Each block reference refers to the same block definition for block "MyBlock".Let's say I use the same block multiple times in the same drawing - is it possible to give each block different values?
Each block definition can have its own custom properties and each block reference can have its own custom properties.
- hungerburg
- Premier Member
- Posts: 160
- Joined: Fri May 28, 2010 7:35 pm
Re: Storing user defined variables to dynamic parts
Here, with qCAD PRO, a quick test done: Each block reference can have custom properties on its own and different from other instances. (I suppose you did edit the block itself and all referenced instances did change, which of course is, what blocks are for, among other uses.)
By key-value store, I referred to this: http://qcad.org/doc/qcad/latest/develop ... 908190d766
Peter
By key-value store, I referred to this: http://qcad.org/doc/qcad/latest/develop ... 908190d766
Peter
-
- Newbie Member
- Posts: 5
- Joined: Sun Aug 09, 2015 3:34 pm
Re: Storing user defined variables to dynamic parts
Hi there,
Sorry for the late reply. I end up buying the Pro licence. I have it sorted out now.
Thanks a lot for your time and helpfulness. I have some other questions, but will ask them in a new thread.
All the best,
Stefan
Sorry for the late reply. I end up buying the Pro licence. I have it sorted out now.
Thanks a lot for your time and helpfulness. I have some other questions, but will ask them in a new thread.
All the best,
Stefan