Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How could I adjust the size of each component? #2015

Open
Satinelamp opened this issue Nov 13, 2020 · 2 comments
Open

How could I adjust the size of each component? #2015

Satinelamp opened this issue Nov 13, 2020 · 2 comments
Labels
enhancement gui:modeling Model creation and editing

Comments

@Satinelamp
Copy link

How could I adjust the size of each component?
It seems like a normal requirement to adjust the size of each component in the model. But I didn't find how to do it in the current version.

Snipaste_2020-11-14_01-17-11

@peterNordin
Copy link
Member

peterNordin commented Nov 16, 2020

It is not possible from inside the program, right now. But I treat this issue as a feature request.
I have thought about it before but never gotten around to implementing it.

You can, however, change the icon scale in the xml file for the component, so in this case the file: componentLibraries/defaultLibrary/Electric/ElectricGroundMultiPort.xml

        <icons>
            <icon scale="1" path="ElectricGround.svg" iconrotation="ON" type="user"/>
        </icons>

But then the scale will be reset when you install the next update

@peterNordin peterNordin added enhancement gui:modeling Model creation and editing labels Nov 16, 2020
@robbr48
Copy link
Contributor

robbr48 commented Nov 18, 2020

A workaround would be to create your own library and then subclass a component from the default library:

<?xml version='1.0' encoding='UTF-8'?>
<hopsanobjectappearance version="0.3">
    <modelobject typename="Ground" subtypename="LargerGround" displayname="Larger C-type Ground (multi-port)">
        <icons>
            <icon scale="3" path="ElectricGround.svg" iconrotation="ON" type="user"/>
        </icons>
        <ports>
            <port y="0.0" x="0.5" a="270" name="P1"/>
        </ports>
    </modelobject>
</hopsanobjectappearance>

In this way the component scale will not be affected when updating to a new Hopsan version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement gui:modeling Model creation and editing
Projects
None yet
Development

No branches or pull requests

3 participants