Comments (10)
According to this https://knowledge.autodesk.com/support/autocad/learn-explore/caas/CloudHelp/cloudhelp/2019/ENU/AutoCAD-Core/files/GUID-82F9BB52-D026-4D6A-ABA6-BF29641F459B-htm.html it is possible
Setting PDMODE and PDSIZE should change point style. I have not tried, will do that latter...
from js-dxf.
Okay thanks, I will be pending ๐
from js-dxf.
Hi,
You can achieve this by using the header()
method, this method it's utility is to add header variables to dxf.
For this purpose there is tow variables in the HEADER
section You can define $PDMODE
and $PDSIZE
.
$PDMODE
define the shape of the point.$PDSIZE
define the size of the point.
const d = new Drawing();
// You can do:
d.header("PDMODE", [[70, value]]); // Where value is your real value.
d.header("PDSIZE", [[40, value]]); // Where value is your real value.
Normally you need to know the variable name and it's utility and add it to dxf with the header() method.
Please see HEADER Section.
- You can find here all possible values of $PDMODE (Header Variable).
- For
$PDSIZE
You can pass a negative value which make the point size relative to the screen, or a positive value makes the point size absolute.
Example:
d.header("PDMODE", [[70, 32]]);
d.header("PDSIZE", [[40, 10]]); // Size absolute.
// Or
d.header("PDSIZE", [[40, -10]]); // Size relative to the screen.
Always set the variable name uppercase and without the $ sign.
@ognjen-petrovic I think this did not need any implementation. Need only explanation.
This apply to all header variables.
Regards
from js-dxf.
Hi @tarikjabiri,
I tried your example (following image) :
but in the document i got this errors:
can you help me please?
from js-dxf.
Hi @tarikjabiri,
I tried your example (following image) :
but in the document i got this errors:
can you help me please?
I modified the values manually and finally can open the file on AUTOCAD, but the file have to be in the following structure
do you know where is the error?
from js-dxf.
Hi,
I am sorry my bad the code should look like this:
d.header("PDMODE", [[70, 32]]);
d.header("PDSIZE", [[40, 10]]);
Array of arrays
from js-dxf.
Hi,
PDMODE fixed but can't open in AUTOCAD
from js-dxf.
Hi,
Is this dxf content generated by js-dxf
?
The 9 should be 0.
Did you change it manually ?
The dxf generated work fine.
I tried this example is working fine:
const d = new Drawing();
d.header("PDMODE", [[70, 32]]);
d.header("PDSIZE", [[40, 5]]);
d.drawPoint(0,0);
d.drawPoint(10,10);
Result:
The issue is resolved please close this issue
Regards.
from js-dxf.
Okay with your code it works, but i have a question :
i want the number 3 not 32, so should be the following the code ?
Thank you for everything!
from js-dxf.
@tarikjabiri @tarikjabiri Great, thanks.
Wondering would it be helpful to add method "setPointStyle" to Drawing class?
from js-dxf.
Related Issues (20)
- Easy solution for large datasets HOT 2
- Question regarding import/read dxf HOT 1
- Cant open in Autodesk DWG TrueView 2022 HOT 2
- drawArc() results in error when calling toDxfString()
- Ellips causes error when invoking toDxfString() HOT 2
- Question related to importing in to webpack projects HOT 1
- find end of shape HOT 4
- Currently layer names containing spaces not supported HOT 6
- Unable to build current code due to static property in 'Handle' class. HOT 1
- Failure compiling with webpack HOT 4
- SVG render
- how to dimensions๏ผ HOT 4
- browser support HOT 1
- Spline control point order? HOT 6
- dupe
- drawSpline is not document in index.d.ts HOT 1
- how to change the font-family of text and set it bold or italic? HOT 2
- how to add a new color dont exist like ORANGE? HOT 2
- How to add/change viewport?
- output fails to run on autodesk online viewer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from js-dxf.